scripts/cli in rvm-0.1.33 vs scripts/cli in rvm-0.1.34

- old
+ new

@@ -103,11 +103,10 @@ ;; list|info|alias|docs) rvm_action="$rvm_token" rvm_ruby_args="$@" - if [[ "$rvm_token" = "info" ]] && [[ -z "$rvm_ruby_args" ]] ; then rvm_ruby_args="$rvm_ruby_string" ; fi rvm_parse_break=1 ;; -S) rvm_action="ruby" @@ -392,10 +391,12 @@ if [[ ! -z "$rvm_error_message" ]] ; then __rvm_pushpop ; return 1 ; fi } rvm() { + __rvm_setup + if [[ ! -z "$PS1" ]] ; then export rvm_interactive=1 ; else unset rvm_interactive ; fi if [[ -z "$ZSH_VERSION" ]] ; then trap 'rm -rf "$rvm_tmp_path/$$" >/dev/null 2>&1' 0 1 2 3 15 fi @@ -431,12 +432,13 @@ list) $rvm_scripts_path/list $rvm_ruby_args ; result=$? ;; # TODO: Make debug run in the current environment. debug) $rvm_scripts_path/info '' debug ; result=$? ;; info) + if [[ "$1" == "info" ]]; then shift; fi if [[ -z "$rvm_ruby_args" ]] ; then - . $rvm_scripts_path/info + $rvm_scripts_path/info else $rvm_scripts_path/info $rvm_ruby_args fi result=$? ;; @@ -462,12 +464,15 @@ $rvm_scripts_path/gemsets $rvm_action result=$? ;; ruby|gem|rake) + old_rvm_ruby_string=$rvm_ruby_string unset rvm_ruby_string $rvm_scripts_path/set $rvm_action $rvm_ruby_args + [[ -n "$old_rvm_ruby_string" ]] && rvm_ruby_string=$old_rvm_ruby_string + unset old_rvm_ruby_string result=$? ;; gemset) #if $rvm_scripts_path/match $rvm_ruby_args use ; then @@ -534,9 +539,11 @@ esac if [[ ! -z "$rvm_reload_flag" ]] ; then source "$rvm_scripts_path/rvm" ; fi if [[ ! -z "$rvm_trace_flag" ]] ; then set +x ; unset rvm_trace_flag ; fi + + __rvm_teardown return $result }