Merge pull request #14803 from Bo98/cask-nil-url

cask: handle nil URLs
This commit is contained in:
Bo Anderson 2023-02-24 18:21:41 +00:00 committed by GitHub
commit ba8fd26755
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -277,8 +277,8 @@ module Cask
return api_to_local_hash(Homebrew::API.merge_variations(json_cask))
end
url_specs = url.specs.dup
case url_specs[:user_agent]
url_specs = url&.specs.dup
case url_specs&.dig(:user_agent)
when :default
url_specs.delete(:user_agent)
when Symbol