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.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index d7faff53e7..0e39cf710c 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -748,6 +748,8 @@ module Bundler
end
end
+ unlock_source_unlocks_spec = Bundler.feature_flag.unlock_source_unlocks_spec?
+
converged = []
@locked_specs.each do |s|
# Replace the locked dependency's source with the equivalent source from the Gemfile
@@ -762,7 +764,7 @@ module Bundler
# XXX This is a backwards-compatibility fix to preserve the ability to
# unlock a single gem by passing its name via `--source`. See issue #3759
# TODO: delete in Bundler 2
- next if @unlock[:sources].include?(s.name)
+ next if unlock_source_unlocks_spec && @unlock[:sources].include?(s.name)
# If the spec is from a path source and it doesn't exist anymore
# then we unlock it.