scripts/selector in rvm-0.1.46 vs scripts/selector in rvm-0.1.47
- old
+ new
@@ -290,20 +290,22 @@
if [[ -n "$new_path" ]] ; then export PATH="$new_path" ; unset new_path ; fi
if [[ -n "$rvm_rvmrc_flag" ]] ; then __rvm_set_rvmrc ; fi
environment_id="$(__rvm_environment_identifier)"
- if [[ ! -z "$rvm_default_flag" ]] && [[ "default" != "$rvm_ruby_interpreter" ]] ; then
+ if [[ -n "$rvm_default_flag" && "default" != "$rvm_ruby_interpreter" ]] ; then
if [[ "$rvm_selfcontained" = "0" ]] ; then
# Sets up the default wrappers.
- $rvm_scripts_path/wrapper "$rvm_ruby_string"
+ $rvm_scripts_path/wrapper "$rvm_ruby_string" --no-prefix
+ else
+ $rvm_scripts_path/wrapper "$rvm_scripts_path" "default"
fi
if [[ "system" = "$rvm_ruby_interpreter" ]] ; then
$rvm_scripts_path/alias delete default &> /dev/null
- \rm -f $rvm_bin_path/default*
- [[ -f $rvm_config_path/default ]] && \rm -f $rvm_config_path/default
- [[ -f $rvm_environments_path/default ]] && \rm -f $rvm_environments_path/default
- [[ -f $rvm_wrappers_path/default ]] && \rm -f $rvm_wrappers_path/default
+ \find "$rvm_bin_path" -name 'default_*' -maxdepth 1 -delete
+ \rm -f $rvm_config_path/default
+ \rm -f $rvm_environments_path/default
+ \rm -rf $rvm_wrappers_path/default
else
RUBY_VERSION="$($rvm_ruby_home/bin/ruby -v | sed 's#^\(.*\) (.*$#\1#')"
export GEM_HOME GEM_PATH BUNDLE_PATH MY_RUBY_HOME RUBY_VERSION
$rvm_scripts_path/alias delete default &> /dev/null
$rvm_scripts_path/alias create default "$environment_id" >& /dev/null