Permalink
Browse files

Bugfix: gemset name persisting after failed use issue. https://gist.g…

…ithub.com/607116 Thanks be to george.
  • Loading branch information...
1 parent ea56daa commit 01343a4cb5d24f21139a09fab923857a639b2ab1 @wayneeseguin wayneeseguin committed Nov 12, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 scripts/selector
View
@@ -746,7 +746,8 @@ __rvm_gemset_select()
rvm_ruby_gem_home="${rvm_gems_path:-"$rvm_path/gems"}/${rvm_ruby_string}${rvm_gemset_separator:-"@"}${rvm_gemset_name}"
fi
else
- "$rvm_path/scripts/log" "error" "Gemsets can not be used with non rvm controlled rubies (currently)."
+ "$rvm_path/scripts/log" "error" \
+ "Gemsets can not be used with non rvm controlled rubies (currently)."
return 1
fi
fi
@@ -758,7 +759,10 @@ __rvm_gemset_select()
if [[ ${rvm_gemset_create_on_use_flag:-0} -ne 1 && ${rvm_create_flag:-0} -ne 1 && ${rvm_delete_flag:-0} -ne 1 ]] ; then
- "$rvm_path/scripts/log" "error" "Gemset '$rvm_gemset_name' does not exist, rvm gemset create '$rvm_gemset_name' first."
+ "$rvm_path/scripts/log" "error" \
+ "Gemset '$rvm_gemset_name' does not exist, rvm gemset create '$rvm_gemset_name' first."
+
+ unset rvm_gemset_name gemset_name
return 1
fi

0 comments on commit 01343a4

Please sign in to comment.