diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-12-08 18:36:13 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-12-10 19:09:55 +0900 |
commit | 0e60bc118b66d626d7e1f985dbd15cfba5e62715 (patch) | |
tree | 9d11647d9b5b738aa7ea4a375d3aeeed61da0055 /lib/bundler | |
parent | 30268d1de697de4b87ab6c655c4dc244be036900 (diff) |
[rubygems/rubygems] Ignore dependencies not actually locked from frozen check
Only needed if there can be no explicit global source (bundler < 3).
https://github.com/rubygems/rubygems/commit/73923f4af5
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/definition.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index c2a8e2ba42..84f0367ac7 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -379,7 +379,12 @@ module Bundler both_sources = Hash.new {|h, k| h[k] = [] } @dependencies.each {|d| both_sources[d.name][0] = d } - locked_dependencies.each {|d| both_sources[d.name][1] = d } + + locked_dependencies.each do |d| + next if !Bundler.feature_flag.bundler_3_mode? && @locked_specs[d.name].empty? + + both_sources[d.name][1] = d + end both_sources.each do |name, (dep, lock_dep)| next if dep.nil? || lock_dep.nil? |