summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Sieger <nick@nicksieger.com>2011-02-10 12:17:59 -0600
committerAndre Arko <andre@arko.net>2011-04-08 13:54:21 -0700
commitf43bfe63e87f84e3dce87a409ff0d26216422ce2 (patch)
treed1e6e43ca10c825767bde5a9f3f462350327dda3
parent03e8223577ecaae5ca2368b72288d16b010936d3 (diff)
downloadbundler-f43bfe63e87f84e3dce87a409ff0d26216422ce2.tar.gz
Rescue from mkdir_p errors in configure_gem_home_and_path
The mkdir_p was originally added for JRuby (see #602). As of JRuby 1.6, some paths will actually raise an error, so we need to rescue and ignore those.
-rw-r--r--lib/bundler.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index e065f77984..502dfc2272 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -265,7 +265,9 @@ module Bundler
ENV["GEM_HOME"] = bundle_path.to_s
end
- FileUtils.mkdir_p bundle_path.to_s
+ # 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
+
Gem.clear_paths
end