summaryrefslogtreecommitdiff
path: root/lib/bundler/settings.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-08-06 11:20:31 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit21db5876caeb8f67dfef6f9010e4ab7639d39c1b (patch)
tree486515a4502b80ba339d98c5786dcf39f559649b /lib/bundler/settings.rb
parentea16a0df80c950861e180aa7a025f527ff2713d0 (diff)
[rubygems/rubygems] Respect `BUNDLE_USER_HOME` for global config location
https://github.com/rubygems/rubygems/commit/58fc31442f
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r--lib/bundler/settings.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 03126f616c..abf7db21b4 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -430,6 +430,8 @@ module Bundler
Pathname.new(ENV["BUNDLE_CONFIG"])
elsif ENV["BUNDLE_USER_CONFIG"] && !ENV["BUNDLE_USER_CONFIG"].empty?
Pathname.new(ENV["BUNDLE_USER_CONFIG"])
+ elsif ENV["BUNDLE_USER_HOME"] && !ENV["BUNDLE_USER_HOME"].empty?
+ Pathname.new(ENV["BUNDLE_USER_HOME"]).join("config")
elsif Bundler.rubygems.user_home && !Bundler.rubygems.user_home.empty?
Pathname.new(Bundler.rubygems.user_home).join(".bundle/config")
end