Skip to content

Conversation

jarrettchisholm
Copy link

When used with a privisioning system that monitors exit status, updating from git fails on line 72:
cd "$NVM_DIR" && command git checkout --quiet $(nvm_latest_version) && command git branch --quiet -D master >/dev/null 2>&1

This is because master doesn't exist.

This patch checks for the existance of master before deleting the branch.

@ljharb
Copy link
Member

ljharb commented Mar 5, 2015

Good lord, this is a great catch. This might fix #559, #685, and #649.

As soon as the tests pass, I'll merge this.

@ljharb ljharb added the installing node Issues with installing node/io.js versions. label Mar 5, 2015
ljharb added a commit that referenced this pull request Mar 6, 2015
- fixed return code of 1 when updating from git
@ljharb ljharb merged commit b18126c into nvm-sh:master Mar 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installing node Issues with installing node/io.js versions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants