aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/audit.rb
diff options
context:
space:
mode:
authorMike McQuaid2017-06-03 10:01:10 +0100
committerGitHub2017-06-03 10:01:10 +0100
commitd6c4dfc783230cb74d43bbcaca421e44bf1e255f (patch)
tree728313aa42b1f6160c16c6fa1593410639ba9528 /Library/Homebrew/dev-cmd/audit.rb
parent965b7a4be904bd27fa2eb246c1d8f28cdc2cc193 (diff)
parent6a0086a0a7242e214bfdf8a1e0a79dc057e75eb0 (diff)
downloadbrew-d6c4dfc783230cb74d43bbcaca421e44bf1e255f.tar.bz2
Merge pull request #2725 from MikeMcQuaid/audit-formulae-options-fix
audit: fix false negative for formulae options.
Diffstat (limited to 'Library/Homebrew/dev-cmd/audit.rb')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 62ea300e1..8e5acf52b 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -959,6 +959,7 @@ class FormulaAuditor
if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+(.*)/
dep = $1
$2.split(" ").map do |o|
+ break if ["if", "unless"].include?(o)
next unless o =~ /^\[?['"](.*)['"]/
problem "Dependency #{dep} should not use option #{$1}"
end