Skip to content

Commit e47bc2f

Browse files
committed
Use hashes of arrays instead
1 parent b44ec56 commit e47bc2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Library/Homebrew/dev-cmd/generate-formula-api.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def run
6969
File.write("_data/formula_canonical.json", "#{canonical_json}\n") unless args.dry_run?
7070

7171
OnSystem::VALID_OS_ARCH_TAGS.each do |bottle_tag|
72-
variation_formulae = all_formulae.map do |_, formula|
72+
variation_formulae = all_formulae.to_h do |name, formula|
7373
formula = Homebrew::API.merge_variations(formula, bottle_tag:)
7474

7575
version = Version.new(formula.dig("versions", "stable"))
@@ -78,7 +78,7 @@ def run
7878
sha256 = formula.dig("bottle", "stable", "files", :all, "sha256")
7979
sha256 ||= formula.dig("bottle", "stable", "files", bottle_tag.to_sym, "sha256")
8080

81-
[formula["name"], pkg_version.to_s, rebuild, sha256]
81+
[name, [pkg_version.to_s, rebuild, sha256]]
8282
end
8383

8484
unless args.dry_run?

0 commit comments

Comments
 (0)