Browse Source

Fix #476 by making sure to cd into `$NVM_DIR` before checking out the tag. Also delete the master branch, because we won't be needing that.

master
Jordan Harband 11 years ago
parent
commit
55d892adc8
  1. 6
      install.sh

6
install.sh

@ -35,8 +35,8 @@ install_nvm_from_git() {
if [ -d "$NVM_DIR/.git" ]; then if [ -d "$NVM_DIR/.git" ]; then
echo "=> nvm is already installed in $NVM_DIR, trying to update" echo "=> nvm is already installed in $NVM_DIR, trying to update"
printf "\r=> " printf "\r=> "
cd "$NVM_DIR" && (git pull 2> /dev/null || { cd "$NVM_DIR" && (git fetch 2> /dev/null || {
echo >&2 "Failed to update nvm, run 'git pull' in $NVM_DIR yourself.." && exit 1 echo >&2 "Failed to update nvm, run 'git fetch' in $NVM_DIR yourself." && exit 1
}) })
else else
# Cloning to $NVM_DIR # Cloning to $NVM_DIR
@ -45,7 +45,7 @@ install_nvm_from_git() {
mkdir -p "$NVM_DIR" mkdir -p "$NVM_DIR"
git clone "$NVM_SOURCE" "$NVM_DIR" git clone "$NVM_SOURCE" "$NVM_DIR"
fi fi
git checkout v0.11.0 cd $NVM_DIR && git checkout v0.11.0 && git branch -D master
} }
install_nvm_as_script() { install_nvm_as_script() {

Loading…
Cancel
Save