Skip to content

Commit 0af23e9

Browse files
committed
Document HOMEBREW_DOWNLOAD_CONCURRENCY environment variable
We're going to be ready in 4.6.0 for users to try this out (but not yet for it to be the default).
1 parent 70bb266 commit 0af23e9

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

Library/Homebrew/env_config.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ module EnvConfig
182182
description: "Use this bearer token for authenticating with a Docker registry proxying GitHub Packages. " \
183183
"Preferred over `$HOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN`.",
184184
},
185+
HOMEBREW_DOWNLOAD_CONCURRENCY: {
186+
description: "If set, Homebrew will download in parallel using this many concurrent connections. " \
187+
"Setting to `auto` will use twice the number of available CPU cores " \
188+
"(what our benchmarks showed to produce the best performance). " \
189+
"If set to `1` (the default), Homebrew will download in serial.",
190+
default: 1,
191+
},
185192
HOMEBREW_EDITOR: {
186193
description: "Use this editor when editing a single formula, or several formulae in the " \
187194
"same directory." \
@@ -633,7 +640,6 @@ def devcmdrun?
633640

634641
sig { returns(Integer) }
635642
def download_concurrency
636-
# TODO: document this variable when ready to publicly announce it.
637643
concurrency = ENV.fetch("HOMEBREW_DOWNLOAD_CONCURRENCY", 1)
638644
concurrency = if concurrency == "auto"
639645
require "os"

docs/Manpage.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4043,6 +4043,15 @@ command execution e.g. `$(cat file)`.
40434043
: Use this bearer token for authenticating with a Docker registry proxying
40444044
GitHub Packages. Preferred over `$HOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN`.
40454045

4046+
`HOMEBREW_DOWNLOAD_CONCURRENCY`
4047+
4048+
: If set, Homebrew will download in parallel using this many concurrent
4049+
connections. Setting to `auto` will use twice the number of available CPU
4050+
cores (what our benchmarks showed to produce the best performance). If set to
4051+
`1` (the default), Homebrew will download in serial.
4052+
4053+
*Default:* `1`.
4054+
40464055
`HOMEBREW_EDITOR`
40474056

40484057
: Use this editor when editing a single formula, or several formulae in the same

manpages/brew.1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,6 +2617,13 @@ Use this base64 encoded username and password for authenticating with a Docker r
26172617
\fBHOMEBREW_DOCKER_REGISTRY_TOKEN\fP
26182618
Use this bearer token for authenticating with a Docker registry proxying GitHub Packages\. Preferred over \fB$HOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN\fP\&\.
26192619
.TP
2620+
\fBHOMEBREW_DOWNLOAD_CONCURRENCY\fP
2621+
If set, Homebrew will download in parallel using this many concurrent connections\. Setting to \fBauto\fP will use twice the number of available CPU cores (what our benchmarks showed to produce the best performance)\. If set to \fB1\fP (the default), Homebrew will download in serial\.
2622+
.RS
2623+
.P
2624+
\fIDefault:\fP \fB1\fP\&\.
2625+
.RE
2626+
.TP
26202627
\fBHOMEBREW_EDITOR\fP
26212628
Use this editor when editing a single formula, or several formulae in the same directory\.
26222629
.RS

0 commit comments

Comments
 (0)