Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Change the way info is called, use the correct environment identifier
  • Loading branch information
Sutto committed May 29, 2010
1 parent 1db62c1 commit 65b048c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions scripts/cli
Expand Up @@ -105,7 +105,6 @@ __rvm_parse_args() {
list|info|alias|docs)
rvm_action="$rvm_token"
rvm_ruby_args="$@"
if [[ "$rvm_token" = "info" ]] && [[ -z "$rvm_ruby_args" ]] ; then rvm_ruby_args="$rvm_ruby_string" ; fi
rvm_parse_break=1
;;

Expand Down Expand Up @@ -435,8 +434,9 @@ rvm() {
# TODO: Make debug run in the current environment.
debug) $rvm_scripts_path/info '' debug ; result=$? ;;
info)
if [[ "$1" == "info" ]]; then shift; fi
if [[ -z "$rvm_ruby_args" ]] ; then
. $rvm_scripts_path/info
$rvm_scripts_path/info
else
$rvm_scripts_path/info $rvm_ruby_args
fi
Expand Down Expand Up @@ -466,8 +466,11 @@ rvm() {
;;

ruby|gem|rake)
old_rvm_ruby_string=$rvm_ruby_string
unset rvm_ruby_string
$rvm_scripts_path/set $rvm_action $rvm_ruby_args
[[ -n "$old_rvm_ruby_string" ]] && rvm_ruby_string=$old_rvm_ruby_string
unset old_rvm_ruby_string
result=$?
;;

Expand Down
4 changes: 2 additions & 2 deletions scripts/info
Expand Up @@ -131,12 +131,12 @@ fi
if [[ -z "$sections" ]] ; then sections="$all_sections" ; fi

if [[ -z "$ruby_strings" ]] ; then
printf "${rvm_ruby_string}:\n"
printf "$(echo "$GEM_HOME" | xargs basename):\n"
info_sections
else
for ruby_string in $(printf $ruby_strings | tr ',' ' ') ; do
rvm_ruby_string="${ruby_string}" ; __rvm_select ; __rvm_use
printf "${rvm_ruby_string}:\n"
printf "$(__rvm_environment_identifier):\n"
info_sections
done
fi

0 comments on commit 65b048c

Please sign in to comment.