update-python-resources: work on bare formula

Also favor Homebrew API over manual string comparison.

Resolves https://github.com/orgs/Homebrew/discussions/5967.
This commit is contained in:
Adrian Ho 2025-02-21 10:32:39 +08:00
parent 01fcbfda53
commit 7e946c19a2

View File

@ -39,7 +39,7 @@ module Homebrew
sig { override.void } sig { override.void }
def run def run
args.named.to_formulae.each do |formula| args.named.to_formulae.each do |formula|
ignore_errors = if T.must(formula.tap).name == "homebrew/core" ignore_errors = if formula.tap&.official?
false false
else else
args.ignore_errors? args.ignore_errors?