mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Skip items strategy blocks in #livecheck_min_os
The `#livecheck_min_os` cask audit method should be skipped when a `Sparkle` `livecheck` block contains a `strategy` block that uses the `items` argument (instead of `item`). These `strategy` blocks contain arbitrary logic that ignores/overrides the strategy's sorting, so we can't identify which item would be first/newest.
This commit is contained in:
parent
bc2ce97e5d
commit
d376b46a7d
@ -597,6 +597,12 @@ module Cask
|
||||
return unless cask.livecheckable?
|
||||
return if cask.livecheck.strategy != :sparkle
|
||||
|
||||
# `Sparkle` strategy blocks that use the `items` argument (instead of
|
||||
# `item`) contain arbitrary logic that ignores/overrides the strategy's
|
||||
# sorting, so we can't identify which item would be first/newest here.
|
||||
return if cask.livecheck.strategy_block.present? &&
|
||||
cask.livecheck.strategy_block.parameters[0] == [:opt, :items]
|
||||
|
||||
out, _, status = curl_output("--fail", "--silent", "--location", cask.livecheck.url)
|
||||
return unless status.success?
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user