aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/audit.rb
diff options
context:
space:
mode:
authorXu Cheng2015-07-22 15:27:58 +0800
committerXu Cheng2015-07-22 15:27:58 +0800
commit51810ae1eab1a7952c0f67e25318ddf93522e572 (patch)
tree06311786cac52c2da40481b2eb0a70bc16ae80ab /Library/Homebrew/cmd/audit.rb
parent33befcf312e12496fc1a6b0df531f03d97dfe954 (diff)
downloadbrew-51810ae1eab1a7952c0f67e25318ddf93522e572.tar.bz2
audit: fix for no-compat mode
Diffstat (limited to 'Library/Homebrew/cmd/audit.rb')
-rw-r--r--Library/Homebrew/cmd/audit.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 5dab3047c..90e491690 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -520,6 +520,7 @@ class FormulaAuditor
end
def audit_patches
+ return unless formula.respond_to?(:patches)
legacy_patches = Patch.normalize_legacy_patches(formula.patches).grep(LegacyPatch)
if legacy_patches.any?
problem "Use the patch DSL instead of defining a 'patches' method"