cask/audit: fix audit error when homepage is missing

This commit is contained in:
Xuehai Pan 2022-09-17 16:40:00 +08:00
parent d3093cd260
commit 46736c5e81

View File

@ -793,6 +793,9 @@ module Cask
else else
host_uri.host host_uri.host
end end
return false if homepage.blank?
home = homepage.downcase home = homepage.downcase
if (split_host = host.split(".")).length >= 3 if (split_host = host.split(".")).length >= 3
host = split_host[-2..].join(".") host = split_host[-2..].join(".")