diff --git a/Library/Homebrew/cask/download.rb b/Library/Homebrew/cask/download.rb index 976e440dee..6912edceda 100644 --- a/Library/Homebrew/cask/download.rb +++ b/Library/Homebrew/cask/download.rb @@ -24,6 +24,8 @@ module Cask sig { override.returns(T.nilable(::URL)) } def url + return if cask.url.nil? + @url ||= ::URL.new(cask.url.to_s, cask.url.specs) end diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 569239ad19..de6751ad6c 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -167,6 +167,11 @@ module Homebrew SimulateSystem.with os: os, arch: arch do cask = Cask::CaskLoader.load(ref) + if cask.depends_on.macos&.satisfied? == false + opoo "#{cask.token}: #{cask.depends_on.macos.message(type: :cask)}" + next + end + quarantine = args.quarantine? quarantine = true if quarantine.nil?