Skip to content
Snippets Groups Projects
Commit 9c46e4be authored by Viktor Szakats's avatar Viktor Szakats Committed by Mike McQuaid
Browse files

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: default avatarMike McQuaid <mike@mikemcquaid.com>
parent 4d442b03
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment