From 78ad5a870cee79255cc24fb632734e7a700548dd Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:46:04 +0800 Subject: [PATCH] formula_installer: add `tap_audit_exception` stub `FormulaInstaller` calls `audit_installed` at install time, which invokes methods in `FormulaCellarChecks`. One of these methods makes a call to `tap_audit_exception` (cf. #11750), but this method isn't visible in `FormulaInstaller`. Instead of trying to replicate the logic of `tap_audit_exception` in `FormulaAuditor` (or trying to initialise an instance of one to make the call to `FormulaAuditor`'s implementation of it), let's just implement a stub that assumes an exception always exists. I'll need to think a bit about whether this is the right fix for this, but currently the missing method error is blocking PRs in Homebrew/core, so let's go with this for now. [1] [1] e.g. Homebrew/homebrew-core#81388, Homebrew/homebrew-core#81582 --- Library/Homebrew/formula_installer.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 95ae29f9be..9b7b0264c9 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1196,6 +1196,12 @@ class FormulaInstaller super end + # This is a stub for calls made to this method at install time. + # Exceptions are correctly identified when doing `brew audit`. + def tap_audit_exception(*) + true + end + def self.locked @locked ||= [] end