bump-cask-pr: ensure new_cask has a url

We sometimes see errors like "attempted to use a `Downloadable`
without a URL!" in the homebrew/cask autobump workflow log because
`bump-cask-pr` can simulate Linux even if a cask doesn't support it,
leading to this error. This is something that should be resolved in
the future once I finally wrap up my related work to detect OS/arch
requirements but this adds a simple guard to address this in the
interim time.
This commit is contained in:
Sam Ford 2025-08-13 09:59:18 -04:00
parent 023bbfdf5c
commit 76a54d1455
No known key found for this signature in database
GPG Key ID: 7AF5CBEE1DD6F76D

View File

@ -273,6 +273,8 @@ module Homebrew
end
languages.each do |language|
new_cask = Cask::CaskLoader.load(tmp_contents)
next unless new_cask.url
new_cask.config = if language.blank?
tmp_cask.config
else