Fix a couple little bugs
parent
d509e32c6f
commit
8d97b78da7
5
nvm.sh
5
nvm.sh
|
@ -120,7 +120,8 @@ nvm()
|
|||
nvm use $VERSION
|
||||
if ! which npm ; then
|
||||
echo "Installing npm..."
|
||||
curl http://npmjs.org/install.sh | sh
|
||||
# TODO: if node version 0.2.x add npm_install=0.2.19 before sh
|
||||
curl http://npmjs.org/install.sh | clean=yes sh
|
||||
fi
|
||||
else
|
||||
echo "nvm: install $VERSION failed!"
|
||||
|
@ -129,6 +130,7 @@ nvm()
|
|||
"deactivate" )
|
||||
if [[ $PATH == *$NVM_DIR/*/bin* ]]; then
|
||||
export PATH=${PATH%$NVM_DIR/*/bin*}${PATH#*$NVM_DIR/*/bin:}
|
||||
hash -r
|
||||
echo "$NVM_DIR/*/bin removed from \$PATH"
|
||||
else
|
||||
echo "Could not find $NVM_DIR/*/bin in \$PATH"
|
||||
|
@ -161,6 +163,7 @@ nvm()
|
|||
MANPATH="$NVM_DIR/$VERSION/share/man:$MANPATH"
|
||||
fi
|
||||
export PATH
|
||||
hash -r
|
||||
export MANPATH
|
||||
export NVM_PATH="$NVM_DIR/$VERSION/lib/node"
|
||||
export NVM_BIN="$NVM_DIR/$VERSION/bin"
|
||||
|
|
Loading…
Reference in New Issue