From 1d4a24d226f09da79502bc6981fdcd0454572942 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 4 Aug 2023 09:36:27 +0100 Subject: [PATCH] Make more warnings quiet with environment hints disabled. Combined with https://github.com/Homebrew/homebrew-test-bot/pull/963 this should make `brew test-bot` output a bit quieter and less annoying. --- Library/Homebrew/formula_cellar_checks.rb | 2 ++ Library/Homebrew/upgrade.rb | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb index 78321b7e27..8a24fcdee6 100644 --- a/Library/Homebrew/formula_cellar_checks.rb +++ b/Library/Homebrew/formula_cellar_checks.rb @@ -18,6 +18,8 @@ module FormulaCellarChecks def problem_if_output(output); end def check_env_path(bin) + return if Homebrew::EnvConfig.no_env_hints? + # warn the user if stuff was installed outside of their PATH return unless bin.directory? return if bin.children.empty? diff --git a/Library/Homebrew/upgrade.rb b/Library/Homebrew/upgrade.rb index 314adea386..b5aea56a0d 100644 --- a/Library/Homebrew/upgrade.rb +++ b/Library/Homebrew/upgrade.rb @@ -256,10 +256,12 @@ module Homebrew verbose: false ) if Homebrew::EnvConfig.no_installed_dependents_check? - opoo <<~EOS - HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set: not checking for outdated - dependents or dependents with broken linkage! - EOS + unless Homebrew::EnvConfig.no_env_hints? + opoo <<~EOS + HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set: not checking for outdated + dependents or dependents with broken linkage! + EOS + end return end