find-appcast: use curl for checking url (#79585)

This commit is contained in:
Vítor Galvão
2020-03-29 17:56:28 +01:00
committed by GitHub
parent 3e6b33d44d
commit f855135128
+3 -8
View File
@@ -23,14 +23,9 @@ def verify_appcast(appcast_type, *urls)
end
def url_exist?(url)
uri = URI.parse(url)
response = Net::HTTP.get_response(uri)
response.is_a? Net::HTTPSuccess
rescue URI::InvalidURIError,
Errno::ECONNREFUSED,
SocketError,
OpenSSL::SSL::SSLError
false
return false unless url
system('curl', '--silent', '--location', '--fail', url, out: File::NULL)
end
def find_sparkle(app)