summaryrefslogtreecommitdiff
path: root/lib/bundler/definition.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r--lib/bundler/definition.rb7
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?