Skip to content

Commit

Permalink
Removed unsetting of rvm_path and rvm_prefix since these are required…
Browse files Browse the repository at this point in the history
… in several scenarios to be pre-set.
  • Loading branch information
wayneeseguin committed Feb 8, 2011
1 parent 2bc0d8c commit da39010
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
18 changes: 9 additions & 9 deletions scripts/cli
Expand Up @@ -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

Expand All @@ -660,12 +666,6 @@ rvm()

fi

__rvm_cleanse_variables

__rvm_load_rvmrc

__rvm_initialize

__rvm_parse_args "$@"

if [[ $? -gt 0 ]] ; then
Expand Down
5 changes: 1 addition & 4 deletions 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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit da39010

Please sign in to comment.