Skip to content

Commit

Permalink
Merge pull request #424 from Homebrew/fix_all_core_formulae_json
Browse files Browse the repository at this point in the history
cmd/formula-analytics: fix --all-core-formulae-json
  • Loading branch information
MikeMcQuaid authored Jan 17, 2024
2 parents 59602f1 + 6e55651 commit 23e5c20
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/formula-analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ def influx_analytics(args)

if (all_core_formulae_json || category == :build_error) &&
(options = tags["options"].presence)
# homebrew/core formulae don't have non-HEAD options but they ended up in our analytics anyway.
if all_core_formulae_json
options = options.split.include?("--HEAD") ? "--HEAD" : ""
end
dimension = "#{dimension} #{options}"
end

Expand Down Expand Up @@ -258,7 +262,7 @@ def influx_analytics(args)
item.delete(:number)
item[:count] = format_count(item[:count])

formula_name = item[dimension_key]
formula_name, = item[dimension_key].split.first
next if formula_name.include?("/")

core_formula_items[formula_name] ||= []
Expand Down

0 comments on commit 23e5c20

Please sign in to comment.