Remove El Capitan system curl workaround

This commit is contained in:
Rylan Polster 2023-11-16 11:47:48 -05:00
parent 8704e79cc0
commit 529f7b7953
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64
3 changed files with 1 additions and 27 deletions

View File

@ -1,15 +0,0 @@
# typed: true
# frozen_string_literal: true
module Utils
module Curl
undef return_value_for_empty_http_status_code
def return_value_for_empty_http_status_code(url_type, url)
# Hack around https://github.com/Homebrew/brew/issues/3199
return if MacOS.version == :el_capitan
generic_return_value_for_empty_http_status_code url_type, url
end
end
end

View File

@ -1,4 +0,0 @@
# typed: strict
# frozen_string_literal: true
require "extend/os/mac/utils/curl" if OS.mac?

View File

@ -320,7 +320,7 @@ module Utils
break if http_status_ok?(details[:status_code])
end
return return_value_for_empty_http_status_code(url_type, url) unless details[:status_code]
return "The #{url_type} #{url} is not reachable" unless details[:status_code]
unless http_status_ok?(details[:status_code])
return if details[:responses].any? do |response|
@ -481,11 +481,6 @@ module Utils
(100..299).cover?(status.to_i)
end
def return_value_for_empty_http_status_code(url_type, url)
"The #{url_type} #{url} is not reachable"
end
alias generic_return_value_for_empty_http_status_code return_value_for_empty_http_status_code
# Separates the output text from `curl` into an array of HTTP responses and
# the final response body (i.e. content). Response hashes contain the
# `:status_code`, `:status_text`, and `:headers`.
@ -619,5 +614,3 @@ module Utils
end
end
end
require "extend/os/utils/curl"