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

Install fails after successful cloning #1146

Closed
ods94065 opened this issue Jul 6, 2016 · 2 comments
Closed

Install fails after successful cloning #1146

ods94065 opened this issue Jul 6, 2016 · 2 comments
Labels
bugs Oh no, something's broken :-( installing nvm Problems installing nvm itself pull request wanted This is a great way to contribute! Help us out :-D

Comments

@ods94065
Copy link

ods94065 commented Jul 6, 2016

I noticed on Friday that installation of NVM using install.sh was no longer succeeding in my VM image builds. I run NVM installation in a larger install script that uses set -e, and I started noticing that the install script would abort and break the build after the "Cloning" step. Investigating further, it looked like the script was exiting with status 1.

I believe I've traced it to this change – specifically, these lines:

command git clone "$(nvm_source)" "$INSTALL_DIR" \
       || echo >&2 "Failed to clone nvm repo. Please report this!" && exit 1

Bash behavior in this case, IIUC, is to run || before the &&, so that exit 1 is executed whether or not the cloning succeeds.

I am verifying a fix that I intend to submit in a follow-up PR. Thanks!

@ljharb
Copy link
Member

ljharb commented Jul 6, 2016

@ods94065 thanks for the report! I'm curious why you're using the master install script, instead of the latest tagged version? master is unstable, and only tagged releases are guaranteed to work.

I think your suspicion is correct, and a PR would be great!

@ljharb ljharb added bugs Oh no, something's broken :-( installing nvm Problems installing nvm itself pull request wanted This is a great way to contribute! Help us out :-D labels Jul 6, 2016
@ods94065
Copy link
Author

ods94065 commented Jul 6, 2016

I'm not sure... there's a lot of history in my install script. :-) I'll make that adjustment too. Thanks!

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 :-( installing nvm Problems installing nvm itself pull request wanted This is a great way to contribute! Help us out :-D
Projects
None yet
Development

No branches or pull requests

2 participants