From c880dd43505e462772187050aa2f1e53b3f75902 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sun, 28 Jul 2024 16:02:38 +0100 Subject: [PATCH] dev-cmd/contributions: Show only the CSV output for `--csv` - This was noisy when using `--csv` as it would print the text output and then the CSV output. --- Library/Homebrew/dev-cmd/contributions.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/dev-cmd/contributions.rb b/Library/Homebrew/dev-cmd/contributions.rb index be2fd7e46b..c991e79e46 100644 --- a/Library/Homebrew/dev-cmd/contributions.rb +++ b/Library/Homebrew/dev-cmd/contributions.rb @@ -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