Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bugfix: unbound variable in cli.

  • Loading branch information...
commit 64119b48820636eee8f81b187aae35edd98021fb 1 parent 5ba0a13
@wayneeseguin wayneeseguin authored
Showing with 38 additions and 7 deletions.
  1. +13 −3 scripts/cli
  2. +8 −2 scripts/manage
  3. +17 −2 scripts/selector
View
16 scripts/cli
@@ -835,9 +835,19 @@ rvm()
help|rtfm|env|current|info|list|gemdir|gemhome|gempath|monitor|notes|package)
- if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
- if [[ "$next_token" = "${rvm_action}" ]]; then shift; fi
- "$rvm_scripts_path/${rvm_action}" $rvm_ruby_args
+ if (( $# > 0 ))
+ then
+ next_token="$1"
+ shift
+ else
+ next_token=""
+ fi
+
+ if [[ "$next_token" = "${rvm_action}" ]]
+ then
+ shift
+ fi
+ "$rvm_scripts_path/${rvm_action}" ${rvm_ruby_args:-}
;;
cleanup|tools|snapshot|disk-usage|repair|alias|docs|rubygems|migrate|upgrade)
View
10 scripts/manage
@@ -1207,7 +1207,10 @@ __rvm_fetch_from_github()
if [[ ! -d "${rvm_repos_path}/$rvm_ruby_string/.git" ]]
then
- __rvm_rm_rf "${rvm_repos_path}/$rvm_ruby_string"
+ if [[ -n "${rvm_ruby_string}" ]]
+ then
+ __rvm_rm_rf "${rvm_repos_path}/$rvm_ruby_string"
+ fi
builtin cd "$rvm_home"
@@ -1251,7 +1254,10 @@ __rvm_fetch_from_github()
fi
)
- __rvm_rm_rf "${rvm_src_path}/$rvm_ruby_string"
+ if [[ -n "${rvm_ruby_string}" ]]
+ then
+ __rvm_rm_rf "${rvm_src_path}/$rvm_ruby_string"
+ fi
__rvm_run "$1.copy" "\\cp -Rf \"${rvm_repos_path}/${rvm_ruby_string}/\" \"${rvm_src_path}/$rvm_ruby_string\"" "Copying from repo to source..."
View
19 scripts/selector
@@ -79,6 +79,16 @@ __rvm_select()
rvm_ruby_version=${rvm_ruby_version:-$(__rvm_db "rbx_version")}
rvm_ruby_repo_url=${rvm_rbx_repo_url:-$(__rvm_db "rubinius_repo_url")}
+ #
+ # rbx,rbx-head => master
+ # rbx-* => * is a remote branch, eg rbx-master, rbx-2.0pre
+ # rbx-t1.2.3 => tag 1.2.3 of master branch
+ #
+ if [[ "${rvm_ruby_version}" = "2.0pre" ]]
+ then
+ rvm_ruby_repo_branch="hydra"
+ fi
+
if (( ${rvm_head_flag:=0} == 0 ))
then
rvm_ruby_patch_level=${rvm_ruby_patch_level:-$(
@@ -743,8 +753,13 @@ __rvm_ruby_string()
rvm_ruby_user_tag="$string"
;;
- b[[:digit:]][[:digit:]]*)
- rvm_ruby_bits="$string"
+ a[[:digit:]][[:digit:]]*)
+ rvm_ruby_bits="$string" # Architecture
+ ;;
+
+ b[[:digit:]]*)
+ rvm_ruby_repo_branch="${string}"
+ rvm_head_flag=1
;;
ruby|rbx|jruby|macruby|ree|kiji|rubinius|maglev|ironruby|goruby)
Please sign in to comment.
Something went wrong with that request. Please try again.