aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/source
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-08-25 09:55:37 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-08-28 11:15:33 +0900
commit279dcfab7aea4474c6722fd39cbf65017edb4b2b (patch)
tree67afe40f1e1f19fc2cec1b523c87a7612c837bb2 /lib/bundler/source
parent7bf5f780281edc2fca83a0657e3a8d256e6e7065 (diff)
downloadruby-279dcfab7aea4474c6722fd39cbf65017edb4b2b.tar.gz
[rubygems/rubygems] Fix standalone install crashing when using legacy multi remote gemfiles
If a legacy multi remote Gemfile depends transitively on a default gem, then in standalone mode we'd fail to fetch the proper version from the source that includes it, since we were adding it to `specs` (instead of `remote_specs`), which was already including the default version of the gem, and thus preventing the remote version from "overwriting that" and being added to the index. We should add it to the `remote_specs` index directly instead. https://github.com/rubygems/rubygems/commit/05f4f9dfc0
Diffstat (limited to 'lib/bundler/source')
-rw-r--r--lib/bundler/source/rubygems.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 15bd8dacbb..7a80ec2b00 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -275,7 +275,9 @@ module Bundler
Bundler.ui.debug "Double checking for #{unmet_dependency_names || "all specs (due to the size of the request)"} in #{self}"
- fetch_names(api_fetchers, unmet_dependency_names, specs, false)
+ fetch_names(api_fetchers, unmet_dependency_names, remote_specs, false)
+
+ specs.use(remote_specs, false)
end
def dependency_names_to_double_check