diff --git a/Library/Homebrew/dev-cmd/generate-formula-api.rb b/Library/Homebrew/dev-cmd/generate-formula-api.rb index 041b815f2d..a9afe47ee7 100644 --- a/Library/Homebrew/dev-cmd/generate-formula-api.rb +++ b/Library/Homebrew/dev-cmd/generate-formula-api.rb @@ -69,7 +69,7 @@ module Homebrew File.write("_data/formula_canonical.json", "#{canonical_json}\n") unless args.dry_run? OnSystem::VALID_OS_ARCH_TAGS.each do |bottle_tag| - variation_formulae = all_formulae.map do |_, formula| + variation_formulae = all_formulae.to_h do |name, formula| formula = Homebrew::API.merge_variations(formula, bottle_tag:) version = Version.new(formula.dig("versions", "stable")) @@ -78,7 +78,7 @@ module Homebrew sha256 = formula.dig("bottle", "stable", "files", :all, "sha256") sha256 ||= formula.dig("bottle", "stable", "files", bottle_tag.to_sym, "sha256") - [formula["name"], pkg_version.to_s, rebuild, sha256] + [name, [pkg_version.to_s, rebuild, sha256]] end unless args.dry_run?