Skip to content

Commit

Permalink
analytics: fix type error
Browse files Browse the repository at this point in the history
Fixes:
Error: Parameter 'days': Expected type String, got type Integer with value 30
Caller: /opt/homebrew/Library/Homebrew/utils/analytics.rb:273
Definition: /opt/homebrew/Library/Homebrew/utils/analytics.rb:412 (Utils::Analytics.table_output)
  • Loading branch information
iMichka committed Jan 26, 2025
1 parent 3ebcbbb commit d436eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/utils/analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def output_analytics(json, args:)
next if args.days.present? && args.days&.to_i != days
next if args.category.present? && args.category != category

table_output(category, days, results)
table_output(category, days.to_s, results)

Check warning on line 273 in Library/Homebrew/utils/analytics.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/utils/analytics.rb#L273

Added line #L273 was not covered by tests
else
total_count = results.values.inject("+")
analytics << "#{number_readable(total_count)} (#{days} days)"
Expand Down

0 comments on commit d436eb2

Please sign in to comment.