scripts/cd in rvm-0.0.98 vs scripts/cd in rvm-0.0.99

- old
+ new

@@ -4,16 +4,21 @@ cd() { builtin cd "$@" if [[ "$rvm_project_rvmrc" != 0 ]] ; then local cwd ; cwd=$(pwd) while : ; do - if [[ -f "$cwd/.rvmrc" ]] ; then source "$cwd/.rvmrc" ; break ; fi - cwd=$(dirname $cwd) if [[ -z "$cwd" ]] || [[ "$HOME" = "$cwd" ]] || [[ "/" = "$cwd" ]] ; then if [[ "$rvm_project_rvmrc_default" != 0 ]] ; then rvm default 1>/dev/null 2>&1 fi break + else + if [[ -f "$cwd/.rvmrc" ]] ; then + source "$cwd/.rvmrc" + break + else + cwd=$(dirname "$cwd") + fi fi done fi }