From 948ad02c84cb6c50d251bfdd3124fa5cc77b5ad3 Mon Sep 17 00:00:00 2001 From: Michelle Nguyen Date: Mon, 2 Mar 2020 17:08:24 -0500 Subject: [PATCH 1/3] Display updated casks when running Already up-to-date.. Fixes #7011. --- Library/Homebrew/cmd/update-report.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index e9d5370835..f777617f93 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -200,6 +200,10 @@ class Reporter # Have a dedicated report array for deleted casks. @report[:DC] << tap.formula_file_to_name(src) end + if status == "M" + # Report updated casks + @report[:MC] << tap.formula_file_to_name(src) + end end next unless paths.any? { |p| tap.formula_file?(p) } @@ -422,6 +426,7 @@ class ReporterHub dump_formula_report :M, "Updated Formulae" dump_formula_report :R, "Renamed Formulae" dump_formula_report :D, "Deleted Formulae" + dump_formula_report :MC, "Updated Casks" end private From 1f5f9b37c78fe193a22d2e8be8705049d8ba102d Mon Sep 17 00:00:00 2001 From: "Michelle Nguyen(she/her)" <43883871+MichelleNguy@users.noreply.github.com> Date: Tue, 3 Mar 2020 10:02:17 -0500 Subject: [PATCH 2/3] Change if statement to elsif. Co-Authored-By: Mike McQuaid --- Library/Homebrew/cmd/update-report.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index f777617f93..db85f2bcf2 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -199,8 +199,7 @@ class Reporter if status == "D" # Have a dedicated report array for deleted casks. @report[:DC] << tap.formula_file_to_name(src) - end - if status == "M" + elsif status == "M" # Report updated casks @report[:MC] << tap.formula_file_to_name(src) end From 352774e80f9663fd6562bff6e7f5426dd5609d0c Mon Sep 17 00:00:00 2001 From: "Michelle Nguyen(she/her)" <43883871+MichelleNguy@users.noreply.github.com> Date: Tue, 3 Mar 2020 10:03:46 -0500 Subject: [PATCH 3/3] Add deleted casks to report dump. Co-Authored-By: Mike McQuaid --- Library/Homebrew/cmd/update-report.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index db85f2bcf2..6e5ee1e8d1 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -426,6 +426,7 @@ class ReporterHub dump_formula_report :R, "Renamed Formulae" dump_formula_report :D, "Deleted Formulae" dump_formula_report :MC, "Updated Casks" + dump_formula_report :DC, "Deleted Casks" end private