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
What happened?
Only nvm-exec and nvm.sh were downloaded.
What did you expect to happen?
$NVM_DIR/bash_completion should have been downloaded as well. It's referenced in .bashrc, and source .bashrc exits with code 1 because its missing.
Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?
Just this in .bashrc:
[ -s "$NVM_DIR/bash_completion" ] ensures that if it doesn't exist, it won't evaluate the rest of the line; that shouldn't make things exit unless you've enabled set -e (which doesn't belong in a bashrc file, that's for sure).
Indeed, the script method only downloads nvm.sh and nvm-exec; I suppose we could add bash_completion too.
My problem was because this check: [ -s "$NVM_DIR/bash_completion" ] was on last line, and when bash_completion wasn't there it affected exit code of source .bashrc.
@ljharb Thank you for the fix. 👍
Btw: what criteria do you have for tagging new release ? I see that last one was back in April.
Operating system and version:
macOS 10.12.5
How did you install
nvm
? (e.g. install script in readme, homebrew):install script (METHOD=script)
What steps did you perform?
Only nvm-exec and nvm.sh were downloaded.
$NVM_DIR/bash_completion should have been downloaded as well. It's referenced in .bashrc, and
source .bashrc
exits with code 1 because its missing..bashrc
,.bash_profile
,.zshrc
, etc) that modifies thePATH
?Just this in .bashrc:
The text was updated successfully, but these errors were encountered: