Merge pull request #15650 from Bo98/disabled-dependents-audit

This commit is contained in:
Carlo Cabrera 2023-07-11 06:10:14 +08:00 committed by GitHub
commit 18b4fc4ba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,6 +323,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}'."