You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doing source "$HOME/.rvm/scripts/rvm from the command line works, no output but after this you get the rvm command available.
Still, if you try to do this from inside the .profile file, you may get some weird errors:
/Users/ssbarnea/.rvm/scripts/functions/selector_parse:145: parse error near `('
/Users/ssbarnea/.rvm/scripts/functions/selector:59: parse error near `('
/Users/ssbarnea/.rvm/scripts/cli:351: parse error
Here is the snipped from .profile:
[ -s "$HOME/.rvm/scripts/rvm" ] && {
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
# shellcheck source=/dev/null
source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
}
The funny part is that if I do source "$HOME/.rvm/scripts/rvm" from inside .zshrc file it work fine but when this done from inside the shared .profile file it fails.
For your information the last lines of the .zshrc aree:
Which would translate into english as: now load the .profile file using bash compatibility mode.
While I do have a workaround, I raise this bug because I find the current behaviour buggy and confusing. Even the main documentation page referring to zsh and rvm doesn't even tell you how to enable rvm in zsh, by default it will not be loaded. See https://rvm.io/integration/zsh
The text was updated successfully, but these errors were encountered:
RVM does not support sh shell - and it's what emulate sh does, it is not bash emulation - they are two different things. I wonder if it's possible to detect if the zsh is in the emulation mode for other shells - RVM will not work with then and we should issue an warning about it.
There is no way this can be fixed on RVM level... at least for RVM v1, it is not compatible with sh shell and you are running the sourcing of ~/.profile in the compatibility mode.
As nothing can be displayed while sourcing rvm we can not display a warning for it.
I wonder why it's required to do the emulate -LR sh for sourcing .profile? Any sh code will work in zsh. Could you just do source ~/.profile?
I switched to zsh few weeks ago but it seems that rvm is broken beyond repair, failing to activate itself.:
Doing
source "$HOME/.rvm/scripts/rvm
from the command line works, no output but after this you get thervm
command available.Still, if you try to do this from inside the .profile file, you may get some weird errors:
Here is the snipped from
.profile
:The funny part is that if I do
source "$HOME/.rvm/scripts/rvm"
from inside.zshrc
file it work fine but when this done from inside the shared.profile
file it fails.For your information the last lines of the
.zshrc
aree:Which would translate into english as: now load the .profile file using bash compatibility mode.
While I do have a workaround, I raise this bug because I find the current behaviour buggy and confusing. Even the main documentation page referring to zsh and rvm doesn't even tell you how to enable rvm in zsh, by default it will not be loaded. See https://rvm.io/integration/zsh
The text was updated successfully, but these errors were encountered: