Enforce strategy url requirement in latest_version
This commit is contained in:
parent
f5774c1af4
commit
a55686a0e2
@ -498,6 +498,11 @@ module Homebrew
|
||||
next
|
||||
end
|
||||
|
||||
if livecheck_strategy.present? && livecheck_url.blank?
|
||||
odebug "#{strategy_name} strategy requires a url"
|
||||
next
|
||||
end
|
||||
|
||||
if livecheck_strategy.present? && strategies.exclude?(strategy)
|
||||
odebug "#{strategy_name} strategy does not apply to this URL"
|
||||
next
|
||||
|
||||
@ -63,9 +63,6 @@ module Homebrew
|
||||
# Only treat the `PageMatch` strategy as usable if a regex is
|
||||
# present in the `livecheck` block
|
||||
next unless regex_provided || block_provided
|
||||
elsif strategy == Sparkle
|
||||
# Skip the `Sparkle` strategy if the URL is not specified explicitly.
|
||||
next unless url_provided
|
||||
elsif strategy.const_defined?(:PRIORITY) &&
|
||||
!strategy::PRIORITY.positive? &&
|
||||
from_symbol(livecheck_strategy) != strategy
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user