Skip to content

Commit

Permalink
livecheck/strategy/extract_plist: fix extract_plist url
Browse files Browse the repository at this point in the history
  • Loading branch information
bevanjkay committed Sep 27, 2024
1 parent 7b1e2d3 commit 63a7847
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Library/Homebrew/livecheck/strategy/extract_plist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,16 @@ def self.find_versions(cask:, url: nil, regex: nil, **_unused, &block)

unversioned_cask_checker = if url.present? && url != cask.url.to_s
# Create a copy of the `cask` that uses the `livecheck` block URL
cask_copy = Cask::CaskLoader.load(cask.sourcefile_path)
cask_copy.allow_reassignment = true
cask_copy.url { url }
cask_source = <<~RUBY
cask "#{cask.token}" do
url "#{url}"
livecheck do
url :url
strategy :extract_plist
end
end
RUBY
cask_copy = Cask::CaskLoader.load(cask_source)

Check warning on line 114 in Library/Homebrew/livecheck/strategy/extract_plist.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/livecheck/strategy/extract_plist.rb#L114

Added line #L114 was not covered by tests
UnversionedCaskChecker.new(cask_copy)
else
UnversionedCaskChecker.new(cask)
Expand Down

0 comments on commit 63a7847

Please sign in to comment.