Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

When called with only one ruby, allow no args.

  • Loading branch information...
commit 7e7324b7d837363f36023f5526f9d356ef023320 1 parent 9e2e46c
@wayneeseguin wayneeseguin authored
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"
Please sign in to comment.
Something went wrong with that request. Please try again.