diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-07-30 10:07:45 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-08-02 16:10:19 +0900 |
commit | 3e4fedca4e0b068908137d44bcf5a567cb8445d0 (patch) | |
tree | 2784d61481b6a0d37ad8d10b0c6931dfef662d2b /lib/bundler/lazy_specification.rb | |
parent | bc90090672450a4ba3ba1025fbbad8991ee84b0e (diff) |
[rubygems/rubygems] Preserve the previous behavior of raising an error when in frozen mode
https://github.com/rubygems/rubygems/commit/6e35a6edfe
Diffstat (limited to 'lib/bundler/lazy_specification.rb')
-rw-r--r-- | lib/bundler/lazy_specification.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index a88172d96b..9f75c7bab2 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -108,7 +108,11 @@ module Bundler (spec.required_ruby_version.satisfied_by?(Gem.ruby_version) && spec.required_rubygems_version.satisfied_by?(Gem.rubygems_version)) end - search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification)) + if search.nil? && Bundler.frozen_bundle? + search = candidates.last + else + search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification)) + end search end end |