scripts/gems in rvm-0.0.57 vs scripts/gems in rvm-0.0.58

- old
+ new

@@ -21,12 +21,12 @@ fi } __rvm_gems_select() { if [ -z "$rvm_gem_set_name" ] ; then - if [ -z "$rvm_gem_set_name" -a ! -z "$rvm_ruby_gem_home" -a ! -z "$rvm_ruby_version" ] ; then - rvm_gem_set_name=$(echo $rvm_ruby_gem_home | xargs basename | sed "s/${rvm_ruby_version}-//") + if [ ! -z "$rvm_ruby_gem_home" -a ! -z "$rvm_ruby_version" ] ; then + rvm_gem_set_name=$(echo $rvm_ruby_gem_home | xargs basename | sed "s/${rvm_ruby_version}[-]*//") fi if [ -z "$rvm_gem_set_name" ] ; then unset rvm_gem_set_name ; fi if [ ! -z "$rvm_gem_set_name" -a ! -z "$(echo $rvm_gem_set_name | awk '/^\d\.\d/')" ] ; then @@ -155,16 +155,16 @@ if [ -z "$rvm_selected_flag" ] ; then __rvm_select $* ; fi __rvm_gems_select if [ ! -z "$rvm_gem_set_name" ] ; then gemdir="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version-$rvm_gem_set_name" if [ -d "$gemdir" -a ! -z "$rvm_force_flag" ] ; then - rm -rf $gemdir + rm -rf "$gemdir" elif [ -d "$gemdir" ] ; then __rvm_log "warn" "Are you SURE you wish to remove the installed gems '$rvm_gem_set_name ' ($gemdir)?" echo -n "(anything other than 'yes' will cancel) > " read response - if [ "$response" = "yes" ] ; then - rm -rf $gemdir + if [ "yes" = "$response" ] ; then + rm -rf "$gemdir" else __rvm_log "info" "Not doing anything, phew... close call that one eh?" fi else __rvm_log "info" "$gemdir already does not exist."