summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-06-10 00:24:54 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-06-15 07:01:25 +0900
commit3e7f5b02aeb2a55b27d402024f42821684d85ec6 (patch)
tree340cfafdfb417a7340a8f861478fcf7440da53bb /lib
parente86f4c581b274a3e0bb198b1567cc9aa07d95343 (diff)
[rubygems/rubygems] Improve error message in frozen mode edge case
When a top level dependency is missing from the lockfile, and we're in frozen mode, we should also print a "frozen error". https://github.com/rubygems/rubygems/commit/3e82b835e3
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/definition.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 5db59efe03..268f424928 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -677,10 +677,14 @@ module Bundler
if missing.any?
@locked_specs.delete(missing)
- missing.first.name
- else
- false
+ return missing.first.name
end
+
+ return if @dependency_changes
+
+ current_dependencies.find do |d|
+ @locked_specs[d.name].empty?
+ end&.name
end
def converge_paths