Merge pull request #19451 from Homebrew/resource-livecheck-parent-fix

livecheck: fix parent reference handling
This commit is contained in:
Mike McQuaid 2025-03-10 17:53:11 +00:00 committed by GitHub
commit f378504f95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -895,9 +895,9 @@ module Homebrew
block_provided: livecheck_strategy_block.present?, block_provided: livecheck_strategy_block.present?,
) )
strategy = Strategy.from_symbol(livecheck_strategy) || strategies.first strategy = Strategy.from_symbol(livecheck_strategy) || strategies.first
next unless strategy next if strategy.blank? && livecheck_reference != :parent
strategy_name = livecheck_strategy_names(strategy) strategy_name = livecheck_strategy_names(strategy) if strategy.present?
if strategy.respond_to?(:preprocess_url) if strategy.respond_to?(:preprocess_url)
url = strategy.preprocess_url(url) url = strategy.preprocess_url(url)