scripts/selector in rvm-1.0.0 vs scripts/selector in rvm-1.0.1

- old
+ new

@@ -227,12 +227,12 @@ if [[ -z "$rvm_ruby_interpreter" ]] ; then rvm_ruby_interpreter="system" ; fi if [[ "system" = "$rvm_ruby_interpreter" ]] ; then unset GEM_HOME GEM_PATH BUNDLE_PATH MY_RUBY_HOME RUBY_VERSION IRBRC - new_path="$(echo $PATH | \tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)" - new_path="$rvm_bin_path:$new_path" + + new_path="$rvm_bin_path:$(__rvm_remove_rvm_from_path ; printf $PATH)" if [[ -s $rvm_config_path/system ]] ; then \grep "MY_RUBY_HOME='$rvm_rubies_path" "$rvm_config_path/system" > /dev/null if [[ $? -eq 0 ]] ; then [[ -f "$rvm_config_path/system" ]] && \rm -f $rvm_config_path/system # 'system' should *not* point to an rvm ruby. else @@ -281,18 +281,21 @@ if [[ ! -z "$rvm_verbose_flag" ]] ; then $rvm_scripts_path/log "info" "Using $(basename $GEM_HOME | \tr '-' ' ' | sed 's/'${rvm_gemset_separator}'/ with gemset /')" fi - new_path="$(echo $PATH | \tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)" - new_path="$GEM_HOME/bin:$rvm_ruby_global_gems_path/bin:$MY_RUBY_HOME/bin:$rvm_bin_path:$new_path" + new_path="$GEM_HOME/bin:$rvm_ruby_global_gems_path/bin:$MY_RUBY_HOME/bin:$rvm_bin_path:$(__rvm_remove_rvm_from_path ; printf $PATH)" fi # Export ruby string and gem set me for extrenal scripts to take advantage of them. if [[ -n "$rvm_ruby_string" ]] ; then export rvm_ruby_string ; fi if [[ -n "$rvm_gemset_name" ]] ; then export rvm_gemset_name ; fi - if [[ -n "$new_path" ]] ; then export PATH="$new_path" ; unset new_path ; fi + if [[ -n "$new_path" ]]; then + export PATH="$new_path" + unset new_path + builtin hash -r + fi if [[ -n "$rvm_rvmrc_flag" ]] ; then __rvm_set_rvmrc ; fi environment_id="$(__rvm_environment_identifier)" if [[ -n "$rvm_default_flag" && "default" != "$rvm_ruby_interpreter" ]] ; then @@ -338,12 +341,9 @@ if [[ -x "$MAGLEV_HOME/gemstone/bin/gslist" ]] ; then $MAGLEV_HOME/gemstone/bin/gslist -clv > /dev/null 2>&1 ; result=$? if [[ $result -eq 1 ]] ; then $rvm_ruby_home/bin/maglev start ; fi fi fi - - # Rehash executable locations, e.g. to force the shell to recognize new items in the path. - builtin hash -r rvm_hook="after_use" ; source $rvm_scripts_path/hook } __rvm_ruby_string() { # rvm_ruby_string may designate any of the following items: