scripts/selector in rvm-0.0.92 vs scripts/selector in rvm-0.0.93
- old
+ new
@@ -164,12 +164,12 @@
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
if [[ -z "$rvm_ruby_interpreter" ]] ; then rvm_ruby_interpreter="default" ; fi
if [[ "default" = "$rvm_ruby_interpreter" ]] ; then
- PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
- PATH=$rvm_bin_path:$PATH ; export PATH
+ new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
+ new_path=$rvm_bin_path:$new_path
if [[ -s $rvm_path/default ]] ; then
source $rvm_path/default
if [[ ! -z "$rvm_verbose_flag" ]] ; then
@@ -183,12 +183,12 @@
fi
elif [[ "system" = "$rvm_ruby_interpreter" ]] ; then
unset GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
- PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
- PATH=$rvm_bin_path:$PATH ; export PATH
+ new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
+ new_path=$rvm_bin_path:$new_path
if [[ -s $rvm_path/system ]] ; then
grep "^MY_RUBY_HOME='$rvm_path" "$rvm_path/system" > /dev/null
if [[ $? -eq 0 ]] ; then
rm -f $rvm_path/system # 'system' should *not* point to an rvm ruby.
else
@@ -204,11 +204,11 @@
if [[ ! -z "$rvm_verbose_flag" ]] ; then
$rvm_scripts_path/log "info" "Now using system ruby."
fi
- rvm_ruby_string="system"
+ export rvm_ruby_string="system"
else
GEM_HOME=$rvm_ruby_gem_home
GEM_PATH=$rvm_ruby_gem_home
MY_RUBY_HOME=$rvm_ruby_home
@@ -231,16 +231,13 @@
if [[ ! -z "$rvm_verbose_flag" ]] ; then
$rvm_scripts_path/log "info" "Now using $(echo $rvm_ruby_string | tr '-' ' ')"
fi
- __rvm_irbrc
+ new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
+ new_path=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:$rvm_bin_path:$new_path
- PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
- PATH=$rvm_bin_path:$PATH ; export PATH
- PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:$PATH ; export PATH
-
if [[ "root" = "$(whoami)" ]] ; then
for binary in erb gem irb rake rdoc ri ruby testrb ; do
rm -f $rvm_symlink_path/$binary
ln -nfs $rvm_ruby_home/bin/$binary $rvm_symlink_path/$binary
rm -f $rvm_symlink_path/passenger_ruby
@@ -283,11 +280,12 @@
# Export ruby string and gem set name for extrnal scripts to take advantage of them.
if [[ ! -z "$rvm_ruby_string" ]] ; then export rvm_ruby_string ; fi
if [[ ! -z "$rvm_gem_set_name" ]] ; then export rvm_gem_set_name ; fi
- if [[ ! -z "$rvm_load_flag" ]] ; then __rvm_gems_load ; fi
- if [[ ! -z "$rvm_dump_flag" ]] ; then __rvm_gems_dump ; fi
+ if [[ ! -z "$new_path" ]] ; then
+ export PATH="$new_path" ; unset new_path
+ fi
__rvm_hook "after_use"
}
__rvm_ruby_string() {