Permalink
Browse files

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.
  • Loading branch information...
1 parent 03e8223 commit f43bfe63e87f84e3dce87a409ff0d26216422ce2 @nicksieger nicksieger committed with indirect Feb 10, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/bundler.rb
View
4 lib/bundler.rb
@@ -265,7 +265,9 @@ def configure_gem_home_and_path
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

0 comments on commit f43bfe6

Please sign in to comment.