diff options
| author | Xu Cheng | 2016-04-07 14:57:37 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-04-07 14:57:37 +0800 |
| commit | d5085edce0b5482771c66cfe3e2c013ee3ca90f6 (patch) | |
| tree | d79778d16115c192c30e4e9730fa049fab4d6c9d | |
| parent | f3cc0596a663e724c6a3b053eb5fae69e245a8a6 (diff) | |
| download | brew-d5085edce0b5482771c66cfe3e2c013ee3ca90f6.tar.bz2 | |
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.
| -rw-r--r-- | Library/Homebrew/utils.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 4b1f6e944..86bc270c8 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -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 |
