Skip to content

Commit

Permalink
Bugfix: rvm gems load now properly skips gems that are already instal…
Browse files Browse the repository at this point in the history
…led.
  • Loading branch information
wayneeseguin committed Feb 5, 2010
1 parent 29f4817 commit 01c21a8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/gems
Expand Up @@ -175,7 +175,7 @@ __rvm_parse_gem_line() {
__rvm_gem_install() {
__rvm_parse_gem_line $*

if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)'spec" ]] ; then
if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)spec" ]] ; then
unset gem
$rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
else
Expand All @@ -199,8 +199,9 @@ __rvm_gem_install() {
gem_file_name="$(basename "$cache_file")"
gem_string="$(echo "$gem_file_name" | sed 's#\.gem$##')"

if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)'spec" ]] ; then
: # already installed, not forcing reinstall.
set -x
if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)spec" ]] ; then
unset gem # already installed, not forcing reinstall.
else
if [[ -s "$rvm_gems_path/cache/$(basename $gem_file_name)" ]] ; then
mkdir -p "$rvm_tmp_path/$$/"
Expand All @@ -210,6 +211,7 @@ __rvm_gem_install() {
gem="$cache_file"
fi
fi
set +x
fi
fi

Expand Down

0 comments on commit 01c21a8

Please sign in to comment.