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>
This commit is contained in:
parent
4d442b0316
commit
9c46e4be0a
@ -343,7 +343,9 @@ class CurlApacheMirrorDownloadStrategy < CurlDownloadStrategy
|
|||||||
@tried_apache_mirror = true
|
@tried_apache_mirror = true
|
||||||
|
|
||||||
mirrors = Utils::JSON.load(apache_mirrors)
|
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}"
|
ohai "Best Mirror #{@url}"
|
||||||
super
|
super
|
||||||
|
Loading…
x
Reference in New Issue
Block a user