Browse files

Removed unsetting of rvm_path and rvm_prefix since these are required…

… in several scenarios to be pre-set.
  • Loading branch information...
1 parent 2bc0d8c commit da39010bda6ef663d2bf36490c79e4c62b87aa10 @wayneeseguin wayneeseguin committed Feb 8, 2011
Showing with 10 additions and 13 deletions.
  1. +9 −9 scripts/cli
  2. +1 −4 scripts/rvm
View
18 scripts/cli
@@ -645,12 +645,18 @@ rvm()
fi
- # Check that this is the current version.
+ if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
+
+ __rvm_cleanse_variables
+
+ __rvm_load_rvmrc
+
+ __rvm_initialize
+
+ # Check that this is the current version, after rvm_path has been determined.
disk_version=$(cat "$rvm_path/VERSION")
disk_version="${disk_version/%.}"
- if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
-
if [[ -n "${rvm_version:-""}" && "${rvm_version:-""}" != "${disk_version:-""}" \
&& "reload" != "${next_token:-""}" ]] ; then
@@ -660,12 +666,6 @@ rvm()
fi
- __rvm_cleanse_variables
-
- __rvm_load_rvmrc
-
- __rvm_initialize
-
__rvm_parse_args "$@"
if [[ $? -gt 0 ]] ; then
View
5 scripts/rvm
@@ -1,8 +1,5 @@
#!/usr/bin/env bash
-rvm_path=
-rvm_prefix=
-
# rvm : Ruby enVironment Manager
# http://rvm.beginrescueend.com
# http://github.com/wayneeseguin/rvm
@@ -50,7 +47,7 @@ if ! declare -f rvm > /dev/null || [[ ${rvm_reload_flag:-0} -eq 1 ]] ; then
fi
- if [[ -z "$rvm_prefix" ]] ; then
+ if [[ -z "${rvm_prefix:-""}" ]] ; then
if [[ "${rvm_selfcontained:-0}" = "0" ]] ; then

0 comments on commit da39010

Please sign in to comment.