Deprecate path args to audit cmd

`brew audit` doesn't work as expected when users
pass in formula/cask paths so we are deprecating it.
This commit is contained in:
apainintheneck 2022-12-21 21:40:58 -08:00
parent f679990d79
commit c2e8bf3e83

View File

@ -140,6 +140,11 @@ module Homebrew
no_named_args = true
[Formula.all, Cask::Cask.all]
else
if args.named.any? { |named_arg| named_arg.end_with?(".rb") }
odeprecated "brew audit [path ...]",
"brew audit [name ...]"
end
args.named.to_formulae_and_casks
.partition { |formula_or_cask| formula_or_cask.is_a?(Formula) }
end