diff options
| author | Viktor Szakats | 2015-04-09 20:52:49 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2015-04-10 08:39:18 +0100 |
| commit | 16495a5a968a04a201a7fdcf6b11430b1f9011e7 (patch) | |
| tree | 03174fc9f011686c5ec517898c4afc2f16230d64 /Library | |
| parent | 28b03c2f9ee5dcf861a6ff7de750b147fe3138e4 (diff) | |
| download | homebrew-16495a5a968a04a201a7fdcf6b11430b1f9011e7.tar.bz2 | |
download_strategy: automatically use apache.org https mirror
Discussion: https://github.com/Homebrew/homebrew/issues/37945
Patch by @jacknagel.
Closes #38492.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 72a64bdd2..589147c31 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -343,7 +343,9 @@ class CurlApacheMirrorDownloadStrategy < CurlDownloadStrategy @tried_apache_mirror = true mirrors = Utils::JSON.load(apache_mirrors) - @url = mirrors.fetch('preferred') + mirrors.fetch('path_info') + path_info = mirrors.fetch("path_info") + @url = mirrors.fetch('preferred') + path_info + @mirrors |= %W[https://archive.apache.org/dist/#{path_info}] ohai "Best Mirror #{@url}" super |
