$NODE_PATH is special, so this function shouldn't risk clobbering it.

master
Jordan Harband 2014-11-28 11:59:45 -06:00
parent 7bbcd3a977
commit 052743816f
1 changed files with 3 additions and 3 deletions

6
nvm.sh
View File

@ -253,11 +253,11 @@ nvm_alias() {
}
nvm_ls_current() {
local NODE_PATH
NODE_PATH="$(which node 2> /dev/null)"
local NVM_LS_CURRENT_NODE_PATH
NVM_LS_CURRENT_NODE_PATH="$(which node 2> /dev/null)"
if [ $? -ne 0 ]; then
echo 'none'
elif nvm_tree_contains_path "$NVM_DIR" "$NODE_PATH"; then
elif nvm_tree_contains_path "$NVM_DIR" "$NVM_LS_CURRENT_NODE_PATH"; then
local VERSION
VERSION=`node -v 2>/dev/null`
if [ "$VERSION" = "v0.6.21-pre" ]; then