scripts/utility in rvm-0.1.21 vs scripts/utility in rvm-0.1.22
- old
+ new
@@ -649,16 +649,16 @@
unset rvm_ruby_gem_home
fi
fi
if [[ -z "$rvm_gemset_name" ]] ; then unset rvm_gemset_name ; fi
else
- if [[ ! -z "$(echo $rvm_ruby_gem_home | grep '%')" ]] ; then
+ if [[ -z "$rvm_ruby_gem_home" ]] || [[ ! -z "$(echo $rvm_ruby_gem_home | grep '%')" ]] ; then
rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string%$rvm_gemset_name"
fi
fi
# If the gemset does not exist, then notify the user as such and abort the action.
- if [[ ! -z "$rvm_gemset_name" ]] && [[ ! -d "$rvm_ruby_gem_home%$rvm_gemset_name" ]] && [[ "$rvm_gemset_create_on_use_flag" -ne 1 ]] && [[ "$rvm_create_flag" -ne 1 ]] && [[ "$rvm_delete_flag" -ne 1 ]] ; then
+ if [[ ! -z "$rvm_gemset_name" ]] && [[ ! -d "$rvm_ruby_gem_home" ]] && [[ "$rvm_gemset_create_on_use_flag" -ne 1 ]] && [[ "$rvm_create_flag" -ne 1 ]] && [[ "$rvm_delete_flag" -ne 1 ]] ; then
$rvm_scripts_path/log "error" "Gemset '$rvm_gemset_name' does not exist, rvm gemset create '$rvm_gemset_name' first."
return 1
elif [[ "$rvm_delete_flag" -eq 1 ]] ; then
return 1
fi