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 fail when nounset is set #1671

Closed
tomaszkrzyzanowski opened this issue Nov 22, 2017 · 0 comments
Closed

nvm.sh fail when nounset is set #1671

tomaszkrzyzanowski opened this issue Nov 22, 2017 · 0 comments
Labels
bugs Oh no, something's broken :-(

Comments

@tomaszkrzyzanowski
Copy link

tomaszkrzyzanowski commented Nov 22, 2017

  • Operating system and version:
    Ubuntu 14.04

  • What steps did you perform?

circleci@buildvm:~$ set -o nounset
circleci@buildvm:~$ export NVM_DIR="/opt/circleci/.nvm" ; [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
bash: NVM_USE_OUTPUT: unbound variable
circleci@buildvm:~$ echo $?
1
  • What happened?

In circleci i need to export/source nvm on every build step (run command) and when i set in my scripts 'nounset' option, then sourcing of nvm.sh fails on NVM_USE_OUTPUT variable

  • What did you expect to happen?

Return 0 after source ;)

It can be simple fixed by set NVM_USE_OUTPUT as empty string

@ljharb ljharb added the bugs Oh no, something's broken :-( label Nov 23, 2017
@ljharb ljharb closed this as completed in a57fe84 Nov 23, 2017
ljharb added a commit to ljharb/nvm that referenced this issue Dec 9, 2017
Fixes
 - fix unassigned variable (nvm-sh#1665, nvm-sh#1664)
 - Fix for $path used by zsh (nvm-sh#1669)
 - `set -u`: ensure `NVM_USE_OUTPUT` is always set (nvm-sh#1671)
 - `install.sh`: Fix a bug that block that installation of node in install.sh (nvm-sh#1676)
 - `nvm install-latest-npm`: fix node 4-4.6

Documentation
 - Make `nvm cache clear` message less ambiguous (nvm-sh#1644)
 - Added missing piece (nvm-sh#1658)
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
Fixes
 - fix unassigned variable (nvm-sh#1665, nvm-sh#1664)
 - Fix for $path used by zsh (nvm-sh#1669)
 - `set -u`: ensure `NVM_USE_OUTPUT` is always set (nvm-sh#1671)
 - `install.sh`: Fix a bug that block that installation of node in install.sh (nvm-sh#1676)
 - `nvm install-latest-npm`: fix node 4-4.6

Documentation
 - Make `nvm cache clear` message less ambiguous (nvm-sh#1644)
 - Added missing piece (nvm-sh#1658)
AGhost-7 pushed a commit to AGhost-7/nvm that referenced this issue Jun 30, 2018
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

2 participants