Permalink
Browse files

Bugfix: 'rvm gems load' once again loads the gems(et).

  • Loading branch information...
1 parent de8df2a commit 3fb857c86d834d01575a25b6689e87d3c7daaf4d @wayneeseguin wayneeseguin committed Dec 11, 2009
Showing with 16 additions and 11 deletions.
  1. +16 −11 scripts/gems
View
@@ -84,21 +84,26 @@ __rvm_gems_load() {
GEM_PATH="$rvm_ruby_gem_home" ; export GEM_PATH ;
fi
+
if [[ -z "$rvm_file_name" ]] ; then
- if [[ -f "$rvm_gem_set_name.gems" ]] ; then
- rvm_file_name="$rvm_gem_set_name.gems"
- elif [[ -f "default.gems" ]] ; then
- rvm_file_name="default.gems"
- elif [[ -f "system.gems" ]] ; then
- rvm_file_name="system.gems"
- elif [[ -f ".gems" ]] ; then
- rvm_file_name=".gems"
- else
- $rvm_scripts_path/log "error" "No gem set file found."
- return 1
+ if [[ ! -z "$rvm_ruby_args" ]] ; then
+ rvm_file_name="$rvm_ruby_args"
fi
fi
+ if [[ -f "$rvm_gem_set_name.gems" ]] ; then
+ rvm_file_name="$rvm_gem_set_name.gems"
+ elif [[ -f "default.gems" ]] ; then
+ rvm_file_name="default.gems"
+ elif [[ -f "system.gems" ]] ; then
+ rvm_file_name="system.gems"
+ elif [[ -f ".gems" ]] ; then
+ rvm_file_name=".gems"
+ else
+ $rvm_scripts_path/log "error" "No gem set file found."
+ return 1
+ fi
+
mkdir -p "$rvm_gem_path/cache" # Ensure the base cache dir is initialized.
if [[ -f "$rvm_file_name" ]] ; then

0 comments on commit 3fb857c

Please sign in to comment.