From 0c9444a2278436dcac197e1462222429ca5e1ced Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Fri, 7 Jul 2023 23:47:28 +0100 Subject: [PATCH] formula_auditor: check disabled formulae have disabled dependents --- Library/Homebrew/formula_auditor.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index b348a0d4d0..4f3544a518 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -322,6 +322,13 @@ module Homebrew EOS end + if dep_f.disabled? && !formula.disabled? + problem <<~EOS + Dependency '#{dep.name}' is disabled but has un-disabled dependents. Either + un-disable '#{dep.name}' or disable it and all of its dependents. + EOS + end + # we want to allow uses_from_macos for aliases but not bare dependencies if self.class.aliases.include?(dep.name) && !dep.uses_from_macos? problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'."