scripts/cli in rvm-0.1.39 vs scripts/cli in rvm-0.1.40
- old
+ new
@@ -119,12 +119,12 @@
rvm_action="ruby"
rvm_ruby_args="$rvm_token \"$@\""
rvm_parse_break=1
;;
- exec)
- rvm_action="exec";
+ exec|cleanup)
+ rvm_action="$rvm_token"
rvm_ruby_args="$(__rvm_quote_args "$@")"
rvm_parse_break=1
;;
do|ruby|rake|gem|rubydo|rakedo|gemdo)
@@ -439,11 +439,11 @@
fi
# Check that this is the current version.
disk_version=$(cat "${rvm_path:-$HOME/.rvm}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')
if [[ "${rvm_version}" != "${disk_version}" ]] && [[ "reload" != "$1" ]]; then
- printf "\nA newer version of rvm has been installed ($disk_version) than is loaded ($rvm_version), please do one of the following:\n * 'rvm reload'\n * open a new shell\n * source your shell init scripts"
+ printf "\nA RVM version ${disk_version} is installed yet ${rvm_version} is loaded.\n Please do one of the following:\n * 'rvm reload'\n * open a new shell\n * source your shell init scripts"
return 1
fi
__rvm_cleanup_variables
__rvm_load_rvmrc
@@ -510,9 +510,14 @@
$rvm_scripts_path/set $rvm_action $rvm_ruby_args
result=$?
# Restore the state pre-sets.
[[ -n "$old_rvm_ruby_string" ]] && rvm_ruby_string=$old_rvm_ruby_string
unset old_rvm_ruby_string
+ ;;
+
+ cleanup)
+ eval "$rvm_scripts_path/cleanup $rvm_ruby_args"
+ result=$?
;;
gemset)
#if $rvm_scripts_path/match $rvm_ruby_args use ; then
if [[ "$rvm_use_flag" -eq 1 ]] ; then