Skip to content
Myr

Unset unnecessary environment variables

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

authored by Robson Peixoto · committed by Robson Peixoto · parent d8a3b07 · Browse files · 2 files+5 added−0 removed
This commit

State

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

Diff stats

2 files+5 added−0 removed

  • tests:+4 added−0 removed
  • other:+1 added−0 removed

2 files+5 added−0 removed

modified:test/fast/Running "nvm deactivate" should unset the nvm environment variables.+4 added
8 unmodified lines
9. ../../nvm.sh10nvm use --delete-prefix v0.2.3 || die "Failed to activate v0.2.3"11[ `expr "$PATH" : ".*v0.2.3/.*/bin"` != 0 ] || die "PATH not set up properly"12[ `expr "$NODE_PATH" : ".*v0.2.3/.*/lib/node_modules"` = 0 ] || die "NODE_PATH should not contain (npm root -g)"13[ `expr "$NVM_BIN" : ".*v0.2.3/bin"` != 0 ] || die "NODE_BIN should contain bin directory path"14[ `expr "$NVM_PATH" : ".*v0.2.3/lib/node"` != 0 ] || die "NODE_PATH should contain lib node directory path"15# ^ note: NODE_PATH should not contain `npm root -g` since globals should not be requireable1617nvm deactivate || die "Failed to deactivate v0.2.3"18[ `expr "$PATH" : ".*v0.2.3/.*/bin"` = 0 ] || die "PATH not cleaned properly"19[ `expr "$NODE_PATH" : ".*v0.2.3/.*/lib/node_modules"` = 0 ] || die "NODE_PATH not cleaned properly"20[ "_$NVM_BIN" = "_" ] || die "NVM_BIN should be unset: got '$NVM_BIN'"21[ "_$NVM_PATH" = "_" ] || die "NVM_PATH should be unset: got '$NVM_PATH'"
modified:nvm.sh+1 added
1868 unmodified lines
1869 export NODE_PATH="$NEWPATH"1870 echo "$NVM_DIR/*/lib/node_modules removed from \$NODE_PATH"1871 fi1872 fi1873 unset NVM_BIN NVM_PATH1874 ;;1875 "use" )1876 local PROVIDED_VERSION1877 local NVM_USE_SILENT
565 unmodified lines