scripts/manage in rvm-0.1.42 vs scripts/manage in rvm-0.1.43

- old
+ new

@@ -865,10 +865,13 @@ fi if [[ -e $rvm_bin_path/$rvm_ruby_string ]] ; then rm -f $rvm_bin_path/$rvm_ruby_string fi done ; unset dir + + __rvm_remove_install_record "$rvm_ruby_string" + __rvm_remove_gemsets __rvm_check_default else @@ -893,10 +896,11 @@ fi __rvm_check_default done ; unset dir + __rvm_remove_install_record "$rvm_ruby_string" __rvm_remove_gemsets __rvm_remove_archives __rvm_remove_aliases __rvm_remove_wrappers __rvm_remove_environments @@ -1150,19 +1154,34 @@ local manage_result=0 if [[ -n "$rubies_string" ]] ;then for rvm_ruby_string in $(echo "$rubies_string" | tr ',' ' ') ; do + current_manage_ruby_string="$rvm_ruby_string" eval "__rvm_${rvm_action}_ruby" + result="$?" + if [[ "$result" -gt 0 && "$manage_result" = 0 ]]; then + manage_result="$result" + fi + [[ "$result" = 0 && "$rvm_action" = "install" ]] && __rvm_record_install "$current_manage_ruby_string" + unset current_manage_ruby_string __rvm_unset_ruby_variables done else # all if [[ "$rvm_action" != "install" ]] ; then while read -r bin_line do # Keep this on second line damnit! if [[ -x "$bin_line" ]] ; then - rvm_ruby_string="$(dirname "$bin_line" | xargs dirname | xargs basename)" + current_manage_ruby_string="$(dirname "$bin_line" | xargs dirname | xargs basename)" + rvm_ruby_string="$current_manage_ruby_string" eval "__rvm_${rvm_action}_ruby" + result="$?" + if [[ "$result" -gt 0 && "$manage_result" = 0 ]]; then + manage_result="$result" + fi + # record as current_manage_string to prevent it being overridden. + [[ "$result" = 0 && "$rvm_action" = "install" ]] && __rvm_record_install "$current_manage_ruby_string" + unset current_manage_ruby_string __rvm_unset_ruby_variables fi done < <(\ls $rvm_rubies_path/*/bin/ruby 2> /dev/null) else $rvm_scripts_path/log "warn" 'Really? Install all? See "rvm list known" and limit the selection to something more sane please :)'