diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index ab584108e3..fff584325c 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -40,14 +40,14 @@ module Homebrew end def update_report - return update_report_impl if $stdout.tty? + return output_update_report if $stdout.tty? redirect_stdout($stderr) do - return update_report_impl + output_update_report end end - def update_report_impl + def output_update_report args = update_report_args.parse # Run `brew update` (again) if we've got a linuxbrew-core CoreTap diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index b3dc3b7150..9e3d5bab9a 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -277,13 +277,11 @@ module Homebrew end def shellcheck - # Always use the latest brewed shellcheck ensure_formula_installed!("shellcheck", latest: true, reason: "shell style checks").opt_bin/"shellcheck" end def shfmt - # Always use the latest brewed shfmt ensure_formula_installed!("shfmt", latest: true, reason: "formatting shell scripts") HOMEBREW_LIBRARY/"Homebrew/utils/shfmt.sh" diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 11f0b38b36..efa4abe7fa 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -438,7 +438,7 @@ module Kernel # Ensure the given formula is installed # This is useful for installing a utility formula (e.g. `shellcheck` for `brew style`) - def ensure_formula_installed!(formula_or_name, latest: false, reason: "", + def ensure_formula_installed!(formula_or_name, reason: "", latest: false, output_to_stderr: true, quiet: false) if output_to_stderr || quiet file = if quiet