On Fri, Mar 16, 2012 at 07:09, Phil Dobbin <[email protected]> wrote:
> However, the other thing I discovered was that if I source my > bash_profile in any tab or window, the Ruby again switches to the > /opt/local/bin/ruby (opening a new window or tab reverts this behaviour > to what's actually written in bash_profile: i.e. rvm's Rubies). > It's setting $PATH, as it's expected to do; it's only supposed to be run once in a "session" (~/.bashrc being the other one). rvm is a shell function that modifies your PATH and assumes, as most things do, that ~/.bash_profile is not re-run within a session. rvm's own setup in ~/.bash_profile is probably confused by it being re-run again; this is not unusual, because you're not supposed to re-run it. The only other thing I can think of is maybe it's expecting a symlink somewhere which is being modified by ~/.bashrc (which is the shell config that is read on all shells) and sudo is triggering it to be run (but as root, not as you, so if it's doing this it should be causing more visible issues. Although it may know enough to make sure any link is owned by you, specifically because of sudo). This could happen with anything that runs a subshell, sudo being probably the most common case for many people. If you pastebin your .bash_profile and .bashrc somewhere I can probably help decipher what exactly is going on. -- brandon s allbery [email protected] wandering unix systems administrator (available) (412) 475-9364 vm/sms
_______________________________________________ macports-users mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
