audit: use ARGV.resolved_formula
There are audit rules which check cellar. Therefore, we need `ARGV.resolved_formula` to get proper spec and prefix. Closes Homebrew/homebrew#44781. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
fe3b69d388
commit
8c4bd3dae2
@ -14,9 +14,9 @@ module Homebrew
|
||||
problem_count = 0
|
||||
|
||||
strict = ARGV.include? "--strict"
|
||||
if strict && ARGV.formulae.any? && MacOS.version >= :mavericks
|
||||
if strict && ARGV.resolved_formulae.any? && MacOS.version >= :mavericks
|
||||
require "cmd/style"
|
||||
ohai "brew style #{ARGV.formulae.join " "}"
|
||||
ohai "brew style #{ARGV.resolved_formulae.join " "}"
|
||||
style
|
||||
end
|
||||
|
||||
@ -48,7 +48,7 @@ module Homebrew
|
||||
ff = if ARGV.named.empty?
|
||||
Formula
|
||||
else
|
||||
ARGV.formulae
|
||||
ARGV.resolved_formulae
|
||||
end
|
||||
|
||||
output_header = !strict
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user