Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

do not clear RG cache unless we actually modify GEM_PATH and GEM_HOME #1567

Merged
merged 1 commit into from Nov 30, 2011
Jump to file or symbol
Failed to load files and symbols.
+8 −5
Split
View
@@ -287,17 +287,20 @@ def configure_gem_home_and_path
if settings[:disable_shared_gems]
ENV['GEM_PATH'] = ''
ENV['GEM_HOME'] = File.expand_path(bundle_path, root)
+ # TODO: This mkdir_p is only needed for JRuby <= 1.5 and should go away (GH #602)
+ FileUtils.mkdir_p bundle_path.to_s rescue nil
+
+ Bundler.rubygems.clear_paths
elsif Bundler.rubygems.gem_dir != bundle_path.to_s
possibles = [Bundler.rubygems.gem_dir, Bundler.rubygems.gem_path]
paths = possibles.flatten.compact.uniq.reject { |p| p.empty? }
ENV["GEM_PATH"] = paths.join(File::PATH_SEPARATOR)
ENV["GEM_HOME"] = bundle_path.to_s
- end
+ # TODO: This mkdir_p is only needed for JRuby <= 1.5 and should go away (GH #602)
+ FileUtils.mkdir_p bundle_path.to_s rescue nil
- # TODO: This mkdir_p is only needed for JRuby <= 1.5 and should go away (GH #602)
- FileUtils.mkdir_p bundle_path.to_s rescue nil
-
- Bundler.rubygems.clear_paths
+ Bundler.rubygems.clear_paths
+ end
end
def upgrade_lockfile