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

non-standard $IFS can cause nvm install failures #1518

Closed
apsoto opened this issue Apr 27, 2017 · 1 comment
Closed

non-standard $IFS can cause nvm install failures #1518

apsoto opened this issue Apr 27, 2017 · 1 comment
Assignees
Labels
bugs Oh no, something's broken :-(

Comments

@apsoto
Copy link

apsoto commented Apr 27, 2017

The change of the field separator from space to \n\t triggers the problem.

I worked around it by setting the IFS back to default in my bash script, I assume nvm needs to find a similar work around

IFS=$' ' # nvm expects the default field separator
  # DO nvm stuff
IFS=$'\n\t' # reset to use bash strict mode

The field separator is changed because I use bash strict mode for my CI build script which invokes nvm install

http://redsymbol.net/articles/unofficial-bash-strict-mode/
$ nvm debug
nvm --version: v0.33.2
$SHELL: /bin/bash
$HOME: /home/bamboo
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu)'
uname -a: 'Linux 3.19.0-43-generic #49-Ubuntu SMP Sun Dec 27 19:43:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux'
OS version: Ubuntu 15.04
curl: /usr/bin/curl, curl 7.38.0 (x86_64-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
wget: /usr/bin/wget, GNU Wget 1.16.1 built on linux-gnu.
git: /usr/bin/git, git version 2.1.4
nvm current: v0.12.7
which node: $NVM_DIR/versions/node/v0.12.7/bin/node
which iojs:
which npm: $NVM_DIR/versions/node/v0.12.7/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v0.12.7
npm root -g: $NVM_DIR/versions/node/v0.12.7/lib/node_modules
  • nvm ls output:
$ nvm ls
->      v0.12.7
         v4.2.4
         system
  • How did you install nvm? (e.g. install script in readme, homebrew):
    chef

  • What steps did you perform?

  • What happened?
    nvm install fails

  • What did you expect to happen?

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?

  • If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?
@ljharb
Copy link
Member

ljharb commented Apr 27, 2017

Indeed related to #1244, #1514, #1227.

For some reason this "bash strict mode" thing has popped up in the last week, and rarely before, even though that article has been up since at least May 2014.

@ljharb ljharb added the bugs Oh no, something's broken :-( label Apr 27, 2017
@ljharb ljharb self-assigned this Apr 27, 2017
@ljharb ljharb closed this as completed in dc5dfe3 Apr 28, 2017
edwmurph pushed a commit to edwmurph/nvm that referenced this issue Apr 9, 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