From c784d9b9556e3cd3f3ebdc76957e27c5115ece0c Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 21 Nov 2020 20:11:43 +0000 Subject: [PATCH] dev-cmd/audit: Fix "undefined method audit_exceptions" - When running `brew audit` on formulae that aren't in a Homebrew tap location (ie, in a directory outside of `/usr/local/Homebrew/Library/Taps`), `brew audit` falls over because it can't determine which tap a formula is in. --- Library/Homebrew/dev-cmd/audit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index c7082b7f42..8072739efe 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -180,7 +180,7 @@ module Homebrew except: args.except, spdx_license_data: spdx_license_data, spdx_exception_data: spdx_exception_data, - tap_audit_exceptions: f.tap.audit_exceptions, + tap_audit_exceptions: f.tap&.audit_exceptions, style_offenses: style_offenses ? style_offenses.for_path(f.path) : nil, display_cop_names: args.display_cop_names?, build_stable: args.build_stable?,