Permalink
Browse files

Feature: rvm_ruby_mode now propigates to the ruby -v output on the do…

… line as well as the ruby string output.
  • Loading branch information...
1 parent ff9b96b commit 0d4c7d4d44a2fd47f30196bd6c63c785aab353a8 @wayneeseguin wayneeseguin committed Nov 20, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 scripts/utility
View
@@ -420,7 +420,10 @@ __rvm_ruby_do() {
return 1
fi
- if [[ ! -z "$rvm_ruby_mode" ]] ; then rvm_ruby_mode="--$(echo $rvm_ruby_mode | sed 's/^m//')" ; fi
+ if [[ ! -z "$rvm_ruby_mode" ]] ; then
+ rvm_ruby_string="$rvm_ruby_string-$rvm_ruby_mode"
+ rvm_ruby_mode="--$(echo $rvm_ruby_mode | sed 's/^m//')"
+ fi
load_path="$rvm_ruby_home/bin:$rvm_ruby_load_path"
# TODO: the else case below should be run if $rvm_ruby_args =~ /\.rb$/
@@ -443,7 +446,7 @@ __rvm_ruby_do() {
touch ./log/$rvm_ruby_string/$rvm_action.log ./log/$rvm_ruby_string/$rvm_action.error.log
eval "$rvm_command" >> ./log/$rvm_ruby_string/$rvm_action.log 2>> ./log/$rvm_ruby_string/$rvm_action.error.log
else
- echo -e "\n\n\033[0;32m$rvm_ruby_string: $($rvm_ruby_home/bin/ruby -v | tr "\n" ' ')\033[0m\n"
+ echo -e "\n\n\033[0;32m$rvm_ruby_string: $($rvm_ruby_home/bin/ruby -v $rvm_ruby_mode | tr "\n" ' ')\033[0m\n"
eval "$rvm_command"
fi
result=$?

0 comments on commit 0d4c7d4

Please sign in to comment.