Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readall: reject casks with no URL #14804

Merged
merged 1 commit into from Feb 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion Library/Homebrew/readall.rb
Expand Up @@ -67,7 +67,15 @@ def valid_casks?(casks, bottle_tag: nil)

success = T.let(true, T::Boolean)
casks.each do |file|
Cask::CaskLoader.load(file)
cask = Cask::CaskLoader.load(file)

# Fine to have missing URLs for unsupported macOS
macos_req = cask.depends_on.macos
next if macos_req&.version && Array(macos_req.version).none? do |macos_version|
bottle_tag.to_macos_version.public_send(macos_req.comparator, macos_version)
end

raise "Missing URL" if cask.url.nil?
rescue Interrupt
raise
rescue Exception => e # rubocop:disable Lint/RescueException
Expand Down