Only audit appcast URL if specified and check its contents.
This commit is contained in:
parent
397f9caa78
commit
05cf8f42e0
@ -571,15 +571,15 @@ module Cask
|
||||
def check_https_availability
|
||||
return unless download
|
||||
|
||||
if !cask.url.blank? && !cask.url.using
|
||||
check_url_for_https_availability(cask.url, user_agents: [cask.url.user_agent])
|
||||
end
|
||||
check_url_for_https_availability(cask.appcast) unless cask.appcast.blank?
|
||||
check_url_for_https_availability(cask.homepage, user_agents: [:browser]) unless cask.homepage.blank?
|
||||
check_url_for_https_availability(cask.url, user_agents: [cask.url.user_agent]) if cask.url && !cask.url.using
|
||||
|
||||
check_url_for_https_availability(cask.appcast, check_content: true) if cask.appcast && appcast?
|
||||
|
||||
check_url_for_https_availability(cask.homepage, check_content: true, user_agents: [:browser]) if cask.homepage
|
||||
end
|
||||
|
||||
def check_url_for_https_availability(url_to_check, user_agents: [:default])
|
||||
problem = curl_check_http_content(url_to_check.to_s, user_agents: user_agents)
|
||||
def check_url_for_https_availability(url_to_check, **options)
|
||||
problem = curl_check_http_content(url_to_check.to_s, **options)
|
||||
add_error problem if problem
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user