From 10b1af8b29e98b4e6296ebaf496753a080a2724d Mon Sep 17 00:00:00 2001 From: Issy Long Date: Wed, 22 Mar 2023 13:54:43 +0000 Subject: [PATCH] formula_auditor: Appease RuboCop with another `&.` --- Library/Homebrew/formula_auditor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index 4c574caf43..99aa219f5b 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -470,7 +470,7 @@ module Homebrew return unless @core_tap return unless formula.keg_only? - keg_only_message = text.to_s.match(/keg_only\s+["'](.*)["']/)&.captures.first + keg_only_message = text.to_s.match(/keg_only\s+["'](.*)["']/)&.captures&.first return unless keg_only_message&.include?("HOMEBREW_PREFIX") problem "`keg_only` reason should not include `HOMEBREW_PREFIX` as it creates confusing `brew info` output."