mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
find-appcast: use curl for checking url (#79585)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user