summaryrefslogtreecommitdiff
path: root/lib/bundler/resolver.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-03-07 18:05:41 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-03-17 18:50:55 +0900
commit0b9e51c4294ff938ef8c244f2ca502ec6c230a63 (patch)
treed61efc74074adb64cd0396b60ca4ce51854b91fa /lib/bundler/resolver.rb
parent12f0be14e2df3450b464c934f82c7b17a1678bd4 (diff)
Don´t consider platform specific candidates when `force_ruby_platform` set
This was working fine for direct dependencies using `force_ruby_platform` explicitly through Gemfile, but not for indirect dependencies. In general, indirect dependencies do not have this property set, but in truffleruby this is different and the default value is to have it set.
Diffstat (limited to 'lib/bundler/resolver.rb')
-rw-r--r--lib/bundler/resolver.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index adc379e1e3..c8cc88a3ee 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -240,7 +240,7 @@ module Bundler
ruby_specs = select_best_platform_match(specs, Gem::Platform::RUBY)
groups << Resolver::Candidate.new(version, :specs => ruby_specs) if ruby_specs.any?
- next groups if platform_specs == ruby_specs
+ next groups if platform_specs == ruby_specs || package.force_ruby_platform?
groups << Resolver::Candidate.new(version, :specs => platform_specs)