Browse files

Bugfix: 'rvm gem install X' works again after extracting gem actions …

…to a external script.
  • Loading branch information...
1 parent 4f821c7 commit e0b0e6b91cd97b44824c4be64d21156828ce8534 @wayneeseguin wayneeseguin committed Dec 11, 2009
Showing with 5 additions and 6 deletions.
  1. +3 −4 scripts/gems
  2. +2 −2 scripts/selector
View
7 scripts/gems
@@ -154,11 +154,9 @@ __rvm_gems_load() {
fi
}
__rvm_gem_install() {
- #
- # Evaluate
- #
- if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/${gem_file_name}spec" ]] ; then
+ installed_gem="$(ls ${rvm_ruby_gem_home}/specifications/${gem_file_name}*spec | head -n 1)"
+ if [[ -z "$rvm_force_flag" ]] && [[ -f "$installed_gem" ]] ; then
unset gem
$rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
else
@@ -261,6 +259,7 @@ elif [[ "list" = "$action" ]] ; then
elif [[ "gemdir" = "$action" ]] ; then
__rvm_gems_gemdir
elif [[ "install" = "$action" ]] ; then
+ gem_file_name="$1"
__rvm_gem_install
else
$rvm_scripts_path/log "error" "gems must be passed an action as the first parameter {load,dump,delete,name,list,gemdir,install}"
View
4 scripts/selector
@@ -167,7 +167,7 @@ __rvm_use() {
if [[ "default" = "$rvm_ruby_interpreter" ]] ; then
PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
- PATH=$rvm_bin_path:$PATH ; export PATH
+ export PATH=$rvm_bin_path:$PATH
if [[ -s $rvm_path/default ]] ; then
source $rvm_path/default
@@ -206,7 +206,7 @@ __rvm_use() {
$rvm_scripts_path/log "info" "Now using system ruby."
fi
- rvm_ruby_string="system"
+ export rvm_ruby_string="system"
else
GEM_HOME=$rvm_ruby_gem_home

0 comments on commit e0b0e6b

Please sign in to comment.