Merge pull request #17887 from Homebrew/contributions-show-only-csv-in-csv-mode

dev-cmd/contributions: Show only the CSV output for `--csv`
This commit is contained in:
Kevin 2024-07-28 09:25:21 -07:00 committed by GitHub
commit 12d0d7b9c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,6 +86,8 @@ module Homebrew
contributions <<
"#{Utils.pluralize("time", grand_totals[username].values.sum, include_count: true)} (total)"
next if args.csv?
puts [
"#{username} contributed",
*contributions.to_sentence,
@ -93,10 +95,7 @@ module Homebrew
].join(" ")
end
return unless args.csv?
puts
puts generate_csv(grand_totals)
puts generate_csv(grand_totals) if args.csv?
end
private