scripts/cli in rvm-0.0.56 vs scripts/cli in rvm-0.0.57
- old
+ new
@@ -3,11 +3,11 @@
function __rvm_meta {
rvm_meta_author="Wayne E. Seguin"
rvm_meta_author_email="wayneeseguin@gmail.com"
rvm_meta_website="http://rvm.beginrescueend.com/"
rvm_meta_version="`cat $rvm_path/lib/VERSION.yml | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//'`"
- rvm_meta_updated="2009.10.09"
+ rvm_meta_updated="2009.10.10"
}
function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; }
function __rvm_usage {
@@ -105,11 +105,11 @@
function __rvm_parse_args {
while [ $# -gt 0 ] ; do
rvm_token="$1" ; shift
case "$rvm_token" in
- install|uninstall|path|info|setup|version|srcdir|list|reset|debug|reload|implode|update|readline|iconv|gemsync)
+ install|uninstall|path|info|setup|version|srcdir|list|reset|debug|reload|implode|readline|iconv|gemsync|update)
rvm_action=$rvm_token
;;
use)
rvm_action=$rvm_token
@@ -188,12 +188,18 @@
do|ruby|rake|gem|rubydo|rakedo|gemdo)
if [ "$rvm_action" = "do" ] ; then rvm_action="ruby" ; fi
rvm_action=$(echo $rvm_token | sed 's/do//g')
if [ "$rvm_action" = "rake" -o "$rvm_action" = "gem" -o "$rvm_action" = "ruby" ] ; then
- rvm_action="ruby"
- rvm_ruby_args="$rvm_token $@"
- rvm_parse_break=1
+ if [ -z "$1" ] ; then
+ rvm_action="error"
+ rvm_error_message="the 'ruby' and 'gem' actions must be followed by arguments."
+ rvm_parse_break=1
+ else
+ rvm_action="ruby"
+ rvm_ruby_args="$rvm_token $@"
+ rvm_parse_break=1
+ fi
else
if [ ! -z "$(echo $1 | awk '/^-/')" ] ; then
unset rvm_ruby_version
else
if [ ! -z "$(echo $1 | awk '/^[0-9]/')" ] ; then