summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2025-02-11 14:03:02 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-02-14 16:13:27 +0900
commite59c90118e893fae3f37ca629291f37e26de48f4 (patch)
treea9722228cce6c1c25919ca7af2a8ef1a4ff457cc /lib
parente11401f799aa9343362a37157de6fbfc1836674d (diff)
[rubygems/rubygems] Raise error when lockfile is missing deps in frozen mode
And avoid installing any gems. https://github.com/rubygems/rubygems/commit/c12700c7e4
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/definition.rb2
-rw-r--r--lib/bundler/errors.rb4
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 35f2919918..da5c344354 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -638,6 +638,8 @@ module Bundler
specs = begin
resolve.materialize(dependencies)
rescue IncorrectLockfileDependencies => e
+ raise if Bundler.frozen_bundle?
+
spec = e.spec
raise "Infinite loop while fixing lockfile dependencies" if incorrect_spec == spec
diff --git a/lib/bundler/errors.rb b/lib/bundler/errors.rb
index 3fa90c5eb8..9d3d89ffeb 100644
--- a/lib/bundler/errors.rb
+++ b/lib/bundler/errors.rb
@@ -254,6 +254,10 @@ module Bundler
@spec = spec
end
+ def message
+ "Bundler found incorrect dependencies in the lockfile for #{spec.full_name}"
+ end
+
status_code(41)
end
end