aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-11-17 17:31:31 +0000
committerMike McQuaid2016-11-18 09:02:39 +0000
commite4fb108079352fb89105cb34a975a18015eee6bc (patch)
tree310ed07d51e01d155904da6c43abdcc76c634a4e /Library
parent5bbc610d2c82fdb761c95155a23d79887b1f5936 (diff)
downloadbrew-e4fb108079352fb89105cb34a975a18015eee6bc.tar.bz2
audit: check for HOMEBREW_PREFIX test path usage.
This is also not allowed. As seen in https://github.com/Homebrew/homebrew-core/pull/6996.
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