Fix --dependents breakage

Without this, we sometimes mistakenly assign runners to dependents jobs
when we don't have to.
This commit is contained in:
Carlo Cabrera 2023-04-05 04:25:28 +08:00
parent 868f9395b6
commit 0c56540831
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -104,7 +104,9 @@ class GitHubRunnerMatrix
compatible_dependents.select! { |dependent_f| dependent_f.send(:"#{arch}_compatible?") } compatible_dependents.select! { |dependent_f| dependent_f.send(:"#{arch}_compatible?") }
compatible_dependents.select! { |dependent_f| dependent_f.compatible_with?(macos_version) } if macos_version compatible_dependents.select! { |dependent_f| dependent_f.compatible_with?(macos_version) } if macos_version
(compatible_dependents - @testing_formulae).present? # These arrays will generally have been generated by different Formulary caches,
# so we can only compare them by name and not directly.
(compatible_dependents.map(&:name) - @testing_formulae.map(&:name)).present?
end end
end end
end end