问题
As far as I know, rvm is a set of bash scripts. Why it need login shells? Which property which only exists in login shells is necessary for rvm?
Related post: rvm installation not working: “RVM is not a function”
回答1:
Your RVM config line ([[ -s "$HOME/.rvm ...
) likely located is in .profile
, which is only read when your bash
is on login-shell mode. There are other config files that are read in other modes as well, like .bashrc
when the shell is interactive, but non-login or file defined by $BASH_ENV
when it is non-interactive.
See INVOCATION section in man bash for more details.
来源:https://stackoverflow.com/questions/38929577/why-rvm-needs-login-shell