Permalink
Browse files

When called with only one ruby, allow no args.

  • Loading branch information...
1 parent 9e2e46c commit 7e7324b7d837363f36023f5526f9d356ef023320 @wayneeseguin wayneeseguin committed Apr 13, 2010
Showing with 10 additions and 2 deletions.
  1. +10 −2 scripts/cli
View
12 scripts/cli
@@ -130,9 +130,17 @@ __rvm_parse_args() {
export rvm_action=$(echo $rvm_token | sed 's#do##g')
if [[ "rake" = "$rvm_action" ]] || [[ "gem" = "$rvm_action" ]] || [[ "ruby" = "$rvm_action" ]] ; then
if [[ -z "$1" ]] ; then
- if [[ "gem" = "$rvm_action" ]] || [[ "ruby" = "$rvm_action" ]] ; then
+ if [[ "gem" = "$rvm_action" ]] ; then
rvm_action="error"
- rvm_error_message="the '$rvm_action' actions must be followed by arguments."
+ rvm_error_message="'rvm $rvm_action' must be followed by arguments."
+ elif [[ "ruby" = "$rvm_action" ]] ; then
+ if [[ -z "$(echo "$rvm_ruby_version" | awk ',')" ]] ; then
+ export rvm_action="ruby"
+ export rvm_ruby_args=""
+ else
+ rvm_action="error"
+ rvm_error_message="rvm X,Y,Z '$rvm_action' must be followed by arguments."
+ fi
fi
elif [[ "-S" = "$1" ]] ; then
export rvm_action="ruby"

0 comments on commit 7e7324b

Please sign in to comment.