aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorViktor Szakats2015-04-09 20:52:49 +0200
committerMike McQuaid2015-04-10 08:39:18 +0100
commit9c46e4be0a08fd86be107e0bdd59c4dfd645ca18 (patch)
tree02192d345daed486ecc5e736731ab9269093be1b /Library
parent4d442b0316fb7783b1964f590a131aca60fd210c (diff)
downloadbrew-9c46e4be0a08fd86be107e0bdd59c4dfd645ca18.tar.bz2
download_strategy: automatically use apache.org https mirror
Discussion: https://github.com/Homebrew/homebrew/issues/37945 Patch by @jacknagel. Closes Homebrew/homebrew#38492. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb4
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