From d181abb62868a5aca6f5fcda36b84af0563a6b9d Mon Sep 17 00:00:00 2001 From: John Loy Date: Thu, 24 Jul 2014 15:28:33 -0400 Subject: [PATCH] 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. --- nvm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nvm.sh b/nvm.sh index beb5153..8d89151 100644 --- a/nvm.sh +++ b/nvm.sh @@ -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