This commit is contained in:
GitHub Merge Button 2011-08-18 09:32:56 -07:00
commit 20722fe58b
1 changed files with 4 additions and 0 deletions

4
nvm.sh
View File

@ -204,6 +204,7 @@ nvm()
fi fi
if [ ! "$3" ]; then if [ ! "$3" ]; then
rm -f $NVM_DIR/alias/$2 rm -f $NVM_DIR/alias/$2
rm -rf $NVM_DIR/alias/$2_bin
echo "$2 -> *poof*" echo "$2 -> *poof*"
return return
fi fi
@ -217,6 +218,9 @@ nvm()
echo "$2 -> $3 (-> $VERSION)" echo "$2 -> $3 (-> $VERSION)"
echo "! WARNING: Moving target. Aliases to implicit versions may change without warning." echo "! WARNING: Moving target. Aliases to implicit versions may change without warning."
else else
rm -rf $NVM_DIR/alias/$2_bin 2>/dev/null
mkdir -p $NVM_DIR/alias/$2_bin
ln -s $NVM_DIR/$3/bin/node $NVM_DIR/alias/$2_bin/node
echo "$2 -> $3" echo "$2 -> $3"
fi fi
;; ;;