parent
4b6075e29b
commit
d09b84de3c
16
nvm.sh
16
nvm.sh
|
@ -836,20 +836,22 @@ nvm() {
|
|||
PATH=`nvm_strip_path "$PATH" "/bin"`
|
||||
# Prepend current version
|
||||
PATH=`nvm_prepend_path "$PATH" "$NVM_VERSION_DIR/bin"`
|
||||
if [ -z "$MANPATH" ]; then
|
||||
MANPATH=$(manpath)
|
||||
if nvm_has manpath; then
|
||||
if [ -z "$MANPATH" ]; then
|
||||
MANPATH=$(manpath)
|
||||
fi
|
||||
# Strip other version from MANPATH
|
||||
MANPATH=`nvm_strip_path "$MANPATH" "/share/man"`
|
||||
# Prepend current version
|
||||
MANPATH=`nvm_prepend_path "$MANPATH" "$NVM_VERSION_DIR/share/man"`
|
||||
export MANPATH
|
||||
fi
|
||||
# Strip other version from MANPATH
|
||||
MANPATH=`nvm_strip_path "$MANPATH" "/share/man"`
|
||||
# Prepend current version
|
||||
MANPATH=`nvm_prepend_path "$MANPATH" "$NVM_VERSION_DIR/share/man"`
|
||||
# Strip other version from NODE_PATH
|
||||
NODE_PATH=`nvm_strip_path "$NODE_PATH" "/lib/node_modules"`
|
||||
# Prepend current version
|
||||
NODE_PATH=`nvm_prepend_path "$NODE_PATH" "$NVM_VERSION_DIR/lib/node_modules"`
|
||||
export PATH
|
||||
hash -r
|
||||
export MANPATH
|
||||
export NODE_PATH
|
||||
export NVM_PATH="$NVM_VERSION_DIR/lib/node"
|
||||
export NVM_BIN="$NVM_VERSION_DIR/bin"
|
||||
|
|
Loading…
Reference in New Issue