diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/utils/curl.rb | 11 | 
1 files changed, 7 insertions, 4 deletions
| diff --git a/Library/Homebrew/utils/curl.rb b/Library/Homebrew/utils/curl.rb index cf1735576..65edd85df 100644 --- a/Library/Homebrew/utils/curl.rb +++ b/Library/Homebrew/utils/curl.rb @@ -2,10 +2,13 @@ require "pathname"  require "open3"  def curl_executable -  curl = Pathname.new ENV["HOMEBREW_CURL"] -  curl = which("curl") unless curl.exist? -  return curl if curl.executable? -  raise "#{curl} is not executable" +  @curl ||= [ +    ENV["HOMEBREW_CURL"], +    which("curl"), +    "/usr/bin/curl", +  ].map { |c| Pathname(c) }.find(&:executable?) +  raise "curl is not executable" unless @curl +  @curl  end  def curl_args(*extra_args, show_output: false, user_agent: :default) | 
