From 95777e7cdff2e3858931381b7299829a94468124 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Mon, 26 Sep 2022 10:49:12 +0200 Subject: [PATCH] Audit: complain if no targets are found --- Library/Homebrew/dev-cmd/audit.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 8167e8df0e..3c88dcc08a 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -141,6 +141,12 @@ module Homebrew args.named.to_formulae_and_casks .partition { |formula_or_cask| formula_or_cask.is_a?(Formula) } end + + if audit_formulae.empty? && audit_casks.empty? + ofail "No audits to perform" + return + end + style_files = args.named.to_paths unless skip_style only_cops = args.only_cops