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