From 87516039a83141b4374d9072ff7ea46b5c2e8062 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 2 May 2014 23:28:42 -0700 Subject: [PATCH] Using portable conditional syntax. --- nvm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvm.sh b/nvm.sh index 1523b80..4af2f5b 100644 --- a/nvm.sh +++ b/nvm.sh @@ -37,8 +37,8 @@ fi # Traverse up in directory tree to find containing folder nvm_find_up() { local path - path=$(pwd) - while [[ "$path" != "" && ! -e "$path/$1" ]]; do + path=$PWD + while [ "$path" != "" ] && [ ! -f "$path/$1" ]; do path=${path%/*} done echo "$path"