Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
'rvm_environements_path/default' is sourced only if 'rvm_action' is not switch.
'rvm_scripts_path/rvm' doesn't get sourced if it doesn't exist, in the final step of the 'cli' execution. This allows for a proper teardown of the internal variables.
  • Loading branch information
tnarik committed Nov 23, 2012
1 parent a244533 commit c4a44d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/cli
Expand Up @@ -1091,7 +1091,7 @@ To reinstall use:
__local_rvm_trace_flag=${rvm_trace_flag:-0}

if
[[ ${rvm_reload_flag:-0} -eq 1 ]]
[[ ${rvm_reload_flag:-0} -eq 1 && -s "$rvm_scripts_path/rvm" ]]
then
__rvm_project_rvmrc_lock=0
source "$rvm_scripts_path/rvm"
Expand Down
2 changes: 1 addition & 1 deletion scripts/rvm
Expand Up @@ -132,7 +132,7 @@ then
builtin command -v ruby | GREP_OPTIONS="" \grep -v "${rvm_path}" >/dev/null ||
builtin command -v ruby | GREP_OPTIONS="" \grep "${rvm_path}/bin/ruby$" >/dev/null
then
if [[ -s "$rvm_environments_path/default" ]]
if [[ -s "$rvm_environments_path/default" && "${rvm_action}" != "switch" ]]
then
source "$rvm_environments_path/default"
elif [[ -s "$rvm_path/environments/default" ]]
Expand Down

0 comments on commit c4a44d3

Please sign in to comment.