audit: improve FileUtils check.
Match the parens properly and only interpolate once. Closes Homebrew/homebrew#35288. Closes Homebrew/homebrew#35291.
This commit is contained in:
parent
77a1c6f166
commit
13239276f0
@ -548,7 +548,7 @@ class FormulaAuditor
|
|||||||
problem "#{$1} is unnecessary; just use #{$2}"
|
problem "#{$1} is unnecessary; just use #{$2}"
|
||||||
end
|
end
|
||||||
|
|
||||||
if line =~ /system (["'](#{FILEUTILS_METHODS}))["' ]/
|
if line =~ /system (["'](#{FILEUTILS_METHODS})["' ])/o
|
||||||
system = $1
|
system = $1
|
||||||
method = $2
|
method = $2
|
||||||
problem "Use the `#{method}` Ruby method instead of `system #{system}`"
|
problem "Use the `#{method}` Ruby method instead of `system #{system}`"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user