From c6aea445a38e333568c5d45bdd05ddb60b27b22d Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 9 Sep 2021 10:24:35 +0100 Subject: [PATCH] formula_auditor: allow uses_from_macos for aliases. This will enable https://github.com/Homebrew/homebrew-core/pull/84910 which will enable https://github.com/Homebrew/brew/pull/12008. --- Library/Homebrew/formula_auditor.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index 1f5483c97e..819c30c8d0 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -263,7 +263,9 @@ module Homebrew next unless @core_tap - if self.class.aliases.include?(dep.name) + # we want to allow uses_from_macos for aliases but not bare dependencies + if self.class.aliases.include?(dep.name) && + (spec.uses_from_macos_elements.blank? || spec.uses_from_macos_elements.exclude?(dep.name)) problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'." end