Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvm.sh exits with code 3 #1587

Closed
1999 opened this issue Aug 8, 2017 · 8 comments
Closed

nvm.sh exits with code 3 #1587

1999 opened this issue Aug 8, 2017 · 8 comments
Labels
bugs Oh no, something's broken :-(

Comments

@1999
Copy link

1999 commented Aug 8, 2017

I run it with set -e. When I add set -eu, I see this error as well:

"/root/.nvm/nvm.sh: line 2669: PROVIDED_VERSION: unbound variable

  • Operating system and version:
    Linux b5ed256ad5ef 4.9.36-moby Build node_g for debugging #1 SMP Wed Jul 12 15:29:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux (docker)

  • How did you install nvm? (e.g. install script in readme, homebrew):
    install script from readme

  • What steps did you perform?

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh"
  • What happened?

"/root/.nvm/nvm.sh: line 2669: PROVIDED_VERSION: unbound variable

exit code 3

@1999 1999 changed the title nvm.sh doesn't work with set -u (exit code 3) nvm.sh exits with code 3 Aug 8, 2017
@ljharb
Copy link
Member

ljharb commented Aug 8, 2017

Thanks!

@ljharb ljharb closed this as completed in 389a53c Aug 8, 2017
@ljharb ljharb added the bugs Oh no, something's broken :-( label Aug 8, 2017
@1999
Copy link
Author

1999 commented Aug 8, 2017

Can I somehow test this change? @ljharb
it looks like even if I try to get latest install.sh from master branch, it will still install nvm.sh from the latest tag:

curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash

@ljharb
Copy link
Member

ljharb commented Aug 8, 2017

The way to test it is to clone the git repo and check out the master branch ($NVM_DIR may already be a git repo)

@1999
Copy link
Author

1999 commented Aug 8, 2017

@ljharb thank you. I just found a similar issue with nvm install in master:

/root/.nvm/nvm.sh: line 2538: SKIP_DEFAULT_PACKAGES: unbound variable

@ljharb
Copy link
Member

ljharb commented Aug 9, 2017

Thanks, that's also now fixed in master.

ljharb added a commit that referenced this issue Aug 9, 2017
edwmurph pushed a commit to edwmurph/nvm that referenced this issue Apr 9, 2018
edwmurph pushed a commit to edwmurph/nvm that referenced this issue Apr 9, 2018
@pvinis
Copy link

pvinis commented Jan 18, 2019

this still happens with 0.34.0

@ljharb
Copy link
Member

ljharb commented Jan 18, 2019

@pvinis could you file a new issue, and fill out the issue template?

@pvinis
Copy link

pvinis commented Jan 19, 2019

@ljharb #1985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs Oh no, something's broken :-(
Projects
None yet
Development

No branches or pull requests

3 participants