Skip to content

Commit

Permalink
Merge pull request #14803 from Bo98/cask-nil-url
Browse files Browse the repository at this point in the history
cask: handle nil URLs
  • Loading branch information
Bo98 committed Feb 24, 2023
2 parents 9fd50a9 + c416e4b commit ba8fd26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/cask/cask.rb
Expand Up @@ -277,8 +277,8 @@ def to_h
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
Expand Down

0 comments on commit ba8fd26

Please sign in to comment.