mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-11 14:51:49 +00:00
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
This commit is contained in:
parent
4b48556e92
commit
91a29c0da2
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…
Reference in New Issue
Block a user