Browse Source

Fix for $path used by zsh

"The lower-case version of PATH is an array parameter
bound to the scalar upper-case parameter."
-- http://www.zsh.org/mla/users/2015/msg00178.html
mail6543210 7 years ago
parent
commit
91a29c0da2
  1. 10
      nvm.sh

10
nvm.sh

@ -273,12 +273,12 @@ nvm_tree_contains_path() {
# Traverse up in directory tree to find containing folder # Traverse up in directory tree to find containing folder
nvm_find_up() { nvm_find_up() {
local path local path_
path="${PWD}" path_="${PWD}"
while [ "${path}" != "" ] && [ ! -f "${path}/${1-}" ]; do while [ "${path_}" != "" ] && [ ! -f "${path_}/${1-}" ]; do
path=${path%/*} path_=${path_%/*}
done done
nvm_echo "${path}" nvm_echo "${path_}"
} }

Loading…
Cancel
Save