scripts/rvm in rvm-0.0.91 vs scripts/rvm in rvm-0.0.92

- old
+ new

@@ -14,11 +14,13 @@ unset rvm_path if [[ "root" = "$(whoami)" ]] ; then rvm_path="/usr/local/rvm" else if [[ -d "$HOME/.rvm" ]] ; then rvm_path="$HOME/.rvm" ; fi - if [[ -d "/usr/local/bin/rvm" ]] && [[ -f "/usr/local/bin/rvm" ]] ; then rvm_path="${rvm_path:-"/usr/local/rvm"}" ; fi + if [[ -d "/usr/local/bin/rvm" ]] && [[ -s "/usr/local/bin/rvm" ]] ; then + rvm_path="${rvm_path:-"/usr/local/rvm"}" + fi fi fi source $rvm_path/scripts/array source $rvm_path/scripts/initialize @@ -33,8 +35,8 @@ rvm_version="$(cat "${rvm_path}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')" ; export rvm_version alias rvm-restart="source '${rvm_path}/scripts/rvm'" - if [[ -f "$rvm_path/default" ]] ; then source "$rvm_path/default" ; fi + if [[ -s "$rvm_path/default" ]] ; then source "$rvm_path/default" ; fi fi