From c834a862ab9f92176c25667802261781f1c2e2ab Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Sat, 13 Sep 2025 23:27:25 +0800 Subject: [PATCH] cmd/update-report: fix formula description display When on a non-default branch (for e.g., testing), `Formula[formula]` can return an error. In that case let's silently ignore it. --- Library/Homebrew/cmd/update-report.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 28b171950b..ccbde8c4ba 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -974,7 +974,11 @@ class ReporterHub # Skip non-homebrew/core formulae for security. return if formula.include?("/") - Formula[formula].desc&.presence + begin + Formula[formula].desc&.presence + rescue FormulaUnavailableError + nil + end else all_formula_json.find { |f| f["name"] == formula } &.fetch("desc", nil)