aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-04-11 10:22:49 +0200
committerMike McQuaid2015-04-12 21:34:53 -0700
commitaffd66ae26283600ebfcc5f0649cf118e0c13e96 (patch)
treefcda0b8f3f0b60c7f9637e9552da3f6b2d48bb0c /Library/Homebrew
parent022436b1fd3f3d2c8a96a3e34e8bbd424d03e74a (diff)
downloadhomebrew-affd66ae26283600ebfcc5f0649cf118e0c13e96.tar.bz2
audit: don't split shell commands when using a glob pattern
Without this, `brew audit <some formula>` may ask people to change: system "./script.sh foo-*" into: system "./script.sh", "foo-*" These are not the same. In the first example the shell expansion occurs while it doesn’t in the second one, breaking the build. Closes #38540. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/audit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index b486af951..a17bfff29 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -720,7 +720,7 @@ class FormulaAuditor
if @strict
if line =~ /system (["'][^"' ]*(?:\s[^"' ]*)+["'])/
bad_system = $1
- unless %w[| < > & ;].any? { |c| bad_system.include? c }
+ unless %w[| < > & ; *].any? { |c| bad_system.include? c }
good_system = bad_system.gsub(" ", "\", \"")
problem "Use `system #{good_system}` instead of `system #{bad_system}` "
end