Remove El Capitan system curl workaround
This commit is contained in:
		
							parent
							
								
									8704e79cc0
								
							
						
					
					
						commit
						529f7b7953
					
				@ -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
 | 
					 | 
				
			||||||
@ -1,4 +0,0 @@
 | 
				
			|||||||
# typed: strict
 | 
					 | 
				
			||||||
# frozen_string_literal: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
require "extend/os/mac/utils/curl" if OS.mac?
 | 
					 | 
				
			||||||
@ -320,7 +320,7 @@ module Utils
 | 
				
			|||||||
        break if http_status_ok?(details[:status_code])
 | 
					        break if http_status_ok?(details[:status_code])
 | 
				
			||||||
      end
 | 
					      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])
 | 
					      unless http_status_ok?(details[:status_code])
 | 
				
			||||||
        return if details[:responses].any? do |response|
 | 
					        return if details[:responses].any? do |response|
 | 
				
			||||||
@ -481,11 +481,6 @@ module Utils
 | 
				
			|||||||
      (100..299).cover?(status.to_i)
 | 
					      (100..299).cover?(status.to_i)
 | 
				
			||||||
    end
 | 
					    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
 | 
					    # Separates the output text from `curl` into an array of HTTP responses and
 | 
				
			||||||
    # the final response body (i.e. content). Response hashes contain the
 | 
					    # the final response body (i.e. content). Response hashes contain the
 | 
				
			||||||
    # `:status_code`, `:status_text`, and `:headers`.
 | 
					    # `:status_code`, `:status_text`, and `:headers`.
 | 
				
			||||||
@ -619,5 +614,3 @@ module Utils
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					 | 
				
			||||||
require "extend/os/utils/curl"
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user