<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 2, 2016 at 9:57 AM, Harald Hanche-Olsen <span dir="ltr"><<a href="mailto:hanche@math.ntnu.no" target="_blank">hanche@math.ntnu.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well, you did not say in the bug report that you were using sudo, so no wonder it got closed.<br></blockquote><div><br></div><div>? sudo is the recommended way to do this.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
My own systems are too heavily modified at the moment for me to be sure, but I have a file /etc/paths.d/45-macports containing the two lines<br>
<br>
/opt/local/bin<br>
/opt/local/sbin<br></blockquote><div><br></div><div>This is not standard.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These should be enough to ensure that those directories appear in the path when you run sudo. You can check by running “sudo printenv PATH”. I believe that file is installed by the macports installer? If not, you can install it yourself. But from what you say, I gather you must have this file? What about /etc/sudoers? Have you made any modifications to that file?<br></blockquote><div><br></div><div>I would also suspect a sudoers modification here. The default should retain the user's PATH, but you can configure sudo to always use the target user's PATH instead, which would lead to this. It would be up to you to arrange that MacPorts and other software continues to work after such a change.</div><div><br></div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>