summaryrefslogtreecommitdiff
path: root/lib/bundler/settings.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r--lib/bundler/settings.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index e98940721e..7339f721ad 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -285,7 +285,11 @@ module Bundler
if ENV["BUNDLE_CONFIG"] && !ENV["BUNDLE_CONFIG"].empty?
Pathname.new(ENV["BUNDLE_CONFIG"])
else
- Bundler.user_bundle_path.join("config")
+ begin
+ Bundler.user_bundle_path.join("config")
+ rescue PermissionError, GenericSystemCallError
+ nil
+ end
end
end