aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-11-18 12:37:46 +0000
committerGitHub2016-11-18 12:37:46 +0000
commitf4810e4eb1e8eec5d22cad019ab207dc1e652b20 (patch)
tree6177079d8bb329ab46fd7cab15ac02ef7771e158 /Library
parentd9ee2d75c570f6c9cfb79157269c9eea86a9d5b4 (diff)
parente4fb108079352fb89105cb34a975a18015eee6bc (diff)
downloadbrew-f4810e4eb1e8eec5d22cad019ab207dc1e652b20.tar.bz2
Merge pull request #1530 from MikeMcQuaid/audit-homebrew-prefix-test-path
audit: check for HOMEBREW_PREFIX test path usage.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index df3b5fafe..08e9a8580 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -760,7 +760,7 @@ class FormulaAuditor
end
bin_names.each do |name|
["system", "shell_output", "pipe_output"].each do |cmd|
- if text =~ /(def test|test do).*#{cmd}[\(\s]+['"]#{Regexp.escape name}[\s'"]/m
+ if text =~ %r{(def test|test do).*(#{Regexp.escape HOMEBREW_PREFIX}/bin/)?#{cmd}[\(\s]+['"]#{Regexp.escape name}[\s'"]}m
problem %Q(fully scope test #{cmd} calls e.g. #{cmd} "\#{bin}/#{name}")
end
end