Merge pull request #17043 from Homebrew/bump_cask_pr_content_loader

dev-cmd/bump-cask-pr: use FromContentLoader when relevant.
This commit is contained in:
Mike McQuaid 2024-04-08 14:19:53 +01:00 committed by GitHub
commit 0e9b2e3da1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -215,7 +215,8 @@ module Homebrew
read_only_run: true, read_only_run: true,
silent: true) silent: true)
tmp_cask = Cask::CaskLoader.load(tmp_contents) tmp_cask = Cask::CaskLoader::FromContentLoader.new(tmp_contents)
.load(config: nil)
old_hash = tmp_cask.sha256 old_hash = tmp_cask.sha256
if tmp_cask.version.latest? || new_hash == :no_check if tmp_cask.version.latest? || new_hash == :no_check
opoo "Ignoring specified `--sha256=` argument." if new_hash.is_a?(String) opoo "Ignoring specified `--sha256=` argument." if new_hash.is_a?(String)