Skip to content
Myr

always apply path stripping

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Koen Punt · committed by Koen Punt · parent 0d81a21 · Browse files · 1 file+10 added−15 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−15 removed

  • other:+10 added−15 removed

1 file+10 added−15 removed

modified:nvm.sh+10 added-15 removed
469 unmodified lines
470 if [ ! -d "$NVM_DIR/$VERSION" ]; then471 echo "$VERSION version is not installed yet"472 return 1473 fi474 if [ `expr "$PATH" : ".*$NVM_DIR/.*/bin"` != 0 ]; then475 # Strip other version from PATH476 PATH=`nvm_strip_path "$PATH" "/bin"`477 fi474 # Strip other version from PATH475 PATH=`nvm_strip_path "$PATH" "/bin"`476 # Prepend current version477 PATH="$NVM_DIR/$VERSION/bin:$PATH"478 if [ -z "$MANPATH" ]; then479 MANPATH=$(manpath)480 fi482 if [ `expr "$MANPATH" : ".*$NVM_DIR/.*/share/man"` != 0 ]; then483 # Strip other version from MANPATH484 MANPATH=`nvm_strip_path "$MANPATH" "/share/man"`485 fi481 # Strip other version from MANPATH482 MANPATH=`nvm_strip_path "$MANPATH" "/share/man"`483 # Prepend current version484 MANPATH="$NVM_DIR/$VERSION/share/man:$MANPATH"487 if [ `expr "$NODE_PATH" : ".*$NVM_DIR/.*/lib/node_modules.*"` != 0 ]; then488 # Strip other version from NODE_PATH489 NODE_PATH=`nvm_strip_path "$NODE_PATH" "/lib/node_modules"`490 fi485 # Strip other version from NODE_PATH486 NODE_PATH=`nvm_strip_path "$NODE_PATH" "/lib/node_modules"`487 # Prepend current version488 NODE_PATH="$NVM_DIR/$VERSION/lib/node_modules:$NODE_PATH"489 export PATH490 hash -r491 export MANPATH
37 unmodified lines
529 if [ ! -d "$NVM_DIR/$VERSION" ]; then530 echo "$VERSION version is not installed yet"531 return;532 fi536 if [ `expr "$NODE_PATH" : ".*$NVM_DIR/.*/lib/node_modules.*"` != 0 ]; then537 RUN_NODE_PATH=`nvm_strip_path "$NODE_PATH" "/lib/node_modules"`533 RUN_NODE_PATH=`nvm_strip_path "$NODE_PATH" "/lib/node_modules"`538 fi534 RUN_NODE_PATH="$NVM_DIR/$VERSION/lib/node_modules:$NODE_PATH"535 echo "Running node $VERSION"536 NODE_PATH=$RUN_NODE_PATH $NVM_DIR/$VERSION/bin/node "$@"537 ;;
88 unmodified lines