Fix "dependencies" being nil.

This commit is contained in:
Carlo Cabrera 2022-08-24 18:18:10 +08:00
parent 69fbaf2dbf
commit be4e926b15
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -888,11 +888,10 @@ module Homebrew
# depends_on "gcc" # depends_on "gcc"
# end # end
# ``` # ```
variations_deps = [] variations_deps = variations.values
variations.each_value do |data| .flat_map { |data| data["dependencies"] }
variations_deps += data["dependencies"] .compact
end .uniq
variations_deps.uniq!
variations_deps.exclude?("gcc") variations_deps.exclude?("gcc")
end end