From c2e8bf3e839e6420a4595111e29c93e471b98c1b Mon Sep 17 00:00:00 2001 From: apainintheneck Date: Wed, 21 Dec 2022 21:40:58 -0800 Subject: [PATCH] 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. --- Library/Homebrew/dev-cmd/audit.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index f3f0c2a6d8..73c8bb4dd2 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -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