Merge pull request #686 from jarrettchisholm/master

- fixed return code of 1 when updating from git
master
Jordan Harband 2015-03-05 16:53:39 -08:00
commit b18126cb15
1 changed files with 4 additions and 1 deletions

View File

@ -69,7 +69,10 @@ install_nvm_from_git() {
mkdir -p "$NVM_DIR" mkdir -p "$NVM_DIR"
command git clone "$(nvm_source git)" "$NVM_DIR" command git clone "$(nvm_source git)" "$NVM_DIR"
fi fi
cd "$NVM_DIR" && command git checkout --quiet $(nvm_latest_version) && command git branch --quiet -D master >/dev/null 2>&1 cd "$NVM_DIR" && command git checkout --quiet $(nvm_latest_version)
if [ ! -z "$(cd "$NVM_DIR" && git show-ref refs/heads/master)" ]; then
cd "$NVM_DIR" && command git branch --quiet -D master >/dev/null 2>&1
fi
return return
} }