From 6764329684f54ba55966dae135a13b1bdea84927 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 19 May 2021 12:11:01 +0100 Subject: [PATCH] formula_installer: don't output caveats for dependencies. If a formula is installed as a dependency (or not on request) then don't output its caveats. Inspired by conversation in https://github.com/Homebrew/brew/pull/11367. Closes https://github.com/Homebrew/brew/pull/11367 --- Library/Homebrew/formula_installer.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index c013e1fbb1..e356c7013f 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -760,6 +760,8 @@ class FormulaInstaller audit_installed if Homebrew::EnvConfig.developer? + return if !installed_on_request? || installed_as_dependency? + caveats = Caveats.new(formula) return if caveats.empty?