Changes $path var to $node_path

Avoids obliteration of $path set earlier by Prezto/zsh. Stomping on $path causes dirname to not be in the PATH resulting in an error.
master
John Loy 2014-07-24 15:28:33 -04:00
parent f5643dc7ea
commit d181abb628
1 changed files with 3 additions and 3 deletions

6
nvm.sh
View File

@ -56,10 +56,10 @@ fi
nvm_tree_contains_path() {
local tree
tree="$1"
local path
path="$2"
local node_path
node_path="$2"
local pathdir
pathdir=$(dirname "$path")
pathdir=$(dirname "$node_path")
while [ "$pathdir" != "" ] && [ "$pathdir" != "." ] && [ "$pathdir" != "/" ] && [ "$pathdir" != "$tree" ]; do
pathdir=$(dirname "$pathdir")
done