4

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”

Community
  • 1
  • 1
Endle_Zhenbo
  • 538
  • 4
  • 23
  • 1
    Your question is unclear. Why do you think RVM needs a login shell? I can find nothing about such a limitation in the RVM documentation. Quite the opposite in fact. It works perfectly fine in any sort of interactive shell, not just a login shell. It isn't activated by default in non-interactive shells, but again, activating it is a simple one-liner, and it's clearly documented with examples. – Jörg W Mittag Aug 13 '16 at 08:11

1 Answers1

2

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.