diff options
| author | Mike McQuaid | 2017-06-02 22:26:37 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2017-06-02 22:26:37 +0100 |
| commit | 6a0086a0a7242e214bfdf8a1e0a79dc057e75eb0 (patch) | |
| tree | 893e64bccb56f5dcae2f2138351853f0d91c9458 /Library | |
| parent | 0731a68cde75206682ed972beb47930afa3c434e (diff) | |
| download | brew-6a0086a0a7242e214bfdf8a1e0a79dc057e75eb0.tar.bz2 | |
audit: fix false negative for formulae options.
Handle the case where an if/unless is detected and then write off this
line for option handling.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index bf7d2fc79..ccc14c3c6 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 |
