Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Using portable conditional syntax.
  • Loading branch information
ljharb committed May 3, 2014
1 parent 80e349e commit 8751603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nvm.sh
Expand Up @@ -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"
Expand Down

0 comments on commit 8751603

Please sign in to comment.