diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-05-26 21:56:17 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-06-06 10:52:57 +0900 |
commit | 03246719ccb2a9c042487b59b31bcac8c30bbff1 (patch) | |
tree | 8db49a08c8afc37d5c0e3289e315ee744e935930 /lib/bundler/settings.rb | |
parent | 7b317243ad25f4366d8c947bcb94c11aa795018f (diff) |
[rubygems/rubygems] Fix `path` vs `deployment` precedence when path set through ENV
The `deployment` setting sets `path` to `vendor/bundle` implicitly, but
that should only apply if `path` is not set explicitly, at any level.
https://github.com/rubygems/rubygems/commit/3552c064c1
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r-- | lib/bundler/settings.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 88dd829d66..b424bcfd52 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -219,7 +219,6 @@ module Bundler def path configs.each do |_level, settings| path = value_for("path", settings) - path = "vendor/bundle" if value_for("deployment", settings) && path.nil? path_system = value_for("path.system", settings) disabled_shared_gems = value_for("disable_shared_gems", settings) next if path.nil? && path_system.nil? && disabled_shared_gems.nil? @@ -227,7 +226,9 @@ module Bundler return Path.new(path, system_path) end - Path.new(nil, false) + path = "vendor/bundle" if self[:deployment] + + Path.new(path, false) end Path = Struct.new(:explicit_path, :system_path) do |