aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-11 12:46:14 -0500
committerJack Nagel2014-07-11 12:46:41 -0500
commit72129668f432b9ddb5fa6a53c2573dd9b15e968e (patch)
tree0bacb45b662198a6056b8a35c6ad327dabe5b0a5 /Library
parentc259866517ac9eb730f2feda8460558135857acd (diff)
downloadbrew-72129668f432b9ddb5fa6a53c2573dd9b15e968e.tar.bz2
audit: warn when using old-style patches
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index ad4132726..085db0710 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -298,8 +298,11 @@ class FormulaAuditor
end
def audit_patches
- patches = Patch.normalize_legacy_patches(f.patches)
- patches.grep(LegacyPatch).each { |p| audit_patch(p) }
+ legacy_patches = Patch.normalize_legacy_patches(f.patches).grep(LegacyPatch)
+ if legacy_patches.any?
+ problem "Use the patch DSL instead of defining a 'patches' method"
+ legacy_patches.each { |p| audit_patch(p) }
+ end
end
def audit_patch(patch)