File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1870,6 +1870,7 @@ nvm() {
1870
1870
echo " $NVM_DIR /*/lib/node_modules removed from \$ NODE_PATH"
1871
1871
fi
1872
1872
fi
1873
+ unset NVM_BIN NVM_PATH
1873
1874
;;
1874
1875
" use" )
1875
1876
local PROVIDED_VERSION
Original file line number Diff line number Diff line change @@ -10,8 +10,12 @@ die () { echo $@ ; exit 1; }
10
10
nvm use --delete-prefix v0.2.3 || die " Failed to activate v0.2.3"
11
11
[ ` expr " $PATH " : " .*v0.2.3/.*/bin" ` != 0 ] || die " PATH not set up properly"
12
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"
13
15
# ^ note: NODE_PATH should not contain `npm root -g` since globals should not be requireable
14
16
15
17
nvm deactivate || die " Failed to deactivate v0.2.3"
16
18
[ ` expr " $PATH " : " .*v0.2.3/.*/bin" ` = 0 ] || die " PATH not cleaned properly"
17
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 '"
You can’t perform that action at this time.
0 commit comments