curl: fall back to /usr/bin/curl when HOMEBREW_CURL doesn't exist
This can happen when `HOMEBREW_CURL` is set to brewed curl, but during `brew resinstall curl`, brewed curl's symlink is temporary unlinked. So let's fallback to /usr/bin/curl in this case.
This commit is contained in:
parent
f3cc0596a6
commit
d5085edce0
@ -311,6 +311,7 @@ end
|
||||
|
||||
def curl(*args)
|
||||
curl = Pathname.new ENV["HOMEBREW_CURL"]
|
||||
curl = Pathname.new "/usr/bin/curl" unless curl.exist?
|
||||
raise "#{curl} is not executable" unless curl.exist? && curl.executable?
|
||||
|
||||
flags = HOMEBREW_CURL_ARGS
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user