Ruby problem

Brandon Allbery allbery.b at gmail.com
Wed Mar 14 19:42:35 PDT 2012


On Wed, Mar 14, 2012 at 16:35, Phil Dobbin <phildobbin at gmail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 14/03/2012 20:23, Jeremy Lavergne wrote:
> >> When MacPorts runs, it does of course clear most of the
> >> environment variables, including PATH, and set them to known-good
> >> values. But this should not affect anything outside of that
> >> MacPorts process. I don't know why your shell environment
> >> variables are changing in this way.
> >
> > Perhaps rvm itself is manipulating things?
>
> If Mac Ports clears most of the environment variables when run, should
> it not also return them to their original state before sudo was called
> when finished?
>

Environment variable changes do not propagate to parent processes on
Unix-like systems.  MacPorts *cannot* affect the environment of the shell
that called it.

"rvm" may be a shell function (that kind of thing often is) specifically so
it can manipulate its calling shell's environment.  Possibly "sudo" is
being wrapped in a function for the same reason (I do that locally but not
to hack the environment).  "port" is not and does not, unless someone there
wrote their own wrapper for it.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20120314/2d9e8c21/attachment.html>


More information about the macports-users mailing list