diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-07-13 20:58:08 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-07-14 10:48:07 +0900 |
commit | 896bbb9fadd10e1ad06ff3fd7d0608acda01ac06 (patch) | |
tree | c6f97aa1b1ed5192dfdd9b84317b742020ec3cb0 /lib/bundler/settings.rb | |
parent | 29f6f79e7396018962eb25c5f5e409f5fe28a73b (diff) |
Merge RubyGems/Bundler master from 8459ebd6ad65ce3397233416dc64083ae7572bb9
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4648
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r-- | lib/bundler/settings.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 95da31a765..de42cc16af 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -428,12 +428,8 @@ module Bundler def global_config_file if ENV["BUNDLE_CONFIG"] && !ENV["BUNDLE_CONFIG"].empty? Pathname.new(ENV["BUNDLE_CONFIG"]) - else - begin - Bundler.user_bundle_path("config") - rescue PermissionError, GenericSystemCallError - nil - end + elsif Bundler.rubygems.user_home && !Bundler.rubygems.user_home.empty? + Pathname.new(Bundler.rubygems.user_home).join(".bundle/config") end end |