cmd/audit: fix type error in cask livecheck url audit
This got updated recently in 42a42c96acc5193dbb6e321ff2aaecceb00e48a4 to split out the livecheck audits and as a result of that the type signature for the #validate_url_for_https_availablity method got updated. This did not account for the possibility that the livecheck url was nil. I've added a nil check here since it makes no sense to try and validate a nil url and we have nil checks for the other two http availability audits already. Plus, the livecheck blocks are audited thoroughly already for syntax.
This commit is contained in:
parent
42a42c96ac
commit
926c5b739a
@ -806,10 +806,11 @@ module Cask
|
|||||||
def audit_livecheck_https_availability
|
def audit_livecheck_https_availability
|
||||||
return unless online?
|
return unless online?
|
||||||
return unless cask.livecheckable?
|
return unless cask.livecheckable?
|
||||||
return if cask.livecheck.url.is_a?(Symbol)
|
return unless (url = cask.livecheck.url)
|
||||||
|
return if url.is_a?(Symbol)
|
||||||
|
|
||||||
validate_url_for_https_availability(
|
validate_url_for_https_availability(
|
||||||
cask.livecheck.url, "livecheck URL",
|
url, "livecheck URL",
|
||||||
check_content: true
|
check_content: true
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user