aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb5
-rw-r--r--Library/Homebrew/manpages/brew.1.md.erb3
2 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 4cb1a185a..ec060cef0 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -330,6 +330,11 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
# Private method, can be overridden if needed.
def _fetch
+ if ENV["HOMEBREW_ARTIFACT_DOMAIN"]
+ @url.sub!(%r{^((ht|f)tps?://)?}, ENV["HOMEBREW_ARTIFACT_DOMAIN"].chomp("/") + "/")
+ ohai "Downloading from #{@url}"
+ end
+
urls = actual_urls
unless urls.empty?
ohai "Downloading from #{urls.last}"
diff --git a/Library/Homebrew/manpages/brew.1.md.erb b/Library/Homebrew/manpages/brew.1.md.erb
index 21fc4f81a..affac9295 100644
--- a/Library/Homebrew/manpages/brew.1.md.erb
+++ b/Library/Homebrew/manpages/brew.1.md.erb
@@ -105,6 +105,9 @@ can take several different forms:
* `HOMEBREW_BOTTLE_DOMAIN`:
If set, instructs Homebrew to use the given URL as a download mirror for bottles.
+ * `HOMEBREW_ARTIFACT_DOMAIN`:
+ If set, instructs Homebrew to use the given URL as a download mirror for bottles and binaries.
+
* `HOMEBREW_BROWSER`:
If set, uses this setting as the browser when opening project homepages,
instead of the OS default browser.