mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Add/use HOMEBREW_CURLRC variable.
This commit is contained in:
parent
0ec47813f1
commit
0bd5869319
@ -47,8 +47,15 @@ fetch() {
|
|||||||
local sha
|
local sha
|
||||||
local temporary_path
|
local temporary_path
|
||||||
|
|
||||||
curl_args=(
|
curl_args=()
|
||||||
-q # do not load .curlrc (must be the first argument)
|
|
||||||
|
# do not load .curlrc unless requested (must be the first argument)
|
||||||
|
if [[ -n "$HOMEBREW_CURLRC" ]]
|
||||||
|
then
|
||||||
|
curl_args[${#curl_args[*]}]="-q"
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl_args+=(
|
||||||
--fail
|
--fail
|
||||||
--remote-time
|
--remote-time
|
||||||
--location
|
--location
|
||||||
|
@ -136,6 +136,10 @@ can take several different forms:
|
|||||||
|
|
||||||
*Default:* `~/Library/Caches/Homebrew`.
|
*Default:* `~/Library/Caches/Homebrew`.
|
||||||
|
|
||||||
|
* `HOMEBREW_CURLRC`:
|
||||||
|
If set, Homebrew will not pass `-q` when invoking `curl`(1) (which disables
|
||||||
|
the use of `curlrc`).
|
||||||
|
|
||||||
* `HOMEBREW_CURL_VERBOSE`:
|
* `HOMEBREW_CURL_VERBOSE`:
|
||||||
If set, Homebrew will pass `--verbose` when invoking `curl`(1).
|
If set, Homebrew will pass `--verbose` when invoking `curl`(1).
|
||||||
|
|
||||||
|
@ -12,11 +12,14 @@ def curl_executable
|
|||||||
end
|
end
|
||||||
|
|
||||||
def curl_args(*extra_args, show_output: false, user_agent: :default)
|
def curl_args(*extra_args, show_output: false, user_agent: :default)
|
||||||
args = [
|
args = [curl_executable.to_s]
|
||||||
curl_executable.to_s,
|
|
||||||
"-q", # do not load .curlrc (must be the first argument)
|
# do not load .curlrc unless requested (must be the first argument)
|
||||||
"--show-error",
|
if ENV["HOMEBREW_CURLRC"]
|
||||||
]
|
args << "-q"
|
||||||
|
end
|
||||||
|
|
||||||
|
args << "--show-error"
|
||||||
|
|
||||||
args << "--user-agent" << case user_agent
|
args << "--user-agent" << case user_agent
|
||||||
when :browser, :fake
|
when :browser, :fake
|
||||||
|
@ -1110,6 +1110,10 @@ can take several different forms:
|
|||||||
|
|
||||||
*Default:* `~/Library/Caches/Homebrew`.
|
*Default:* `~/Library/Caches/Homebrew`.
|
||||||
|
|
||||||
|
* `HOMEBREW_CURLRC`:
|
||||||
|
If set, Homebrew will not pass `-q` when invoking `curl`(1) (which disables
|
||||||
|
the use of `curlrc`).
|
||||||
|
|
||||||
* `HOMEBREW_CURL_VERBOSE`:
|
* `HOMEBREW_CURL_VERBOSE`:
|
||||||
If set, Homebrew will pass `--verbose` when invoking `curl`(1).
|
If set, Homebrew will pass `--verbose` when invoking `curl`(1).
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "BREW\-CASK" "1" "March 2018" "Homebrew" "brew-cask"
|
.TH "BREW\-CASK" "1" "April 2018" "Homebrew" "brew-cask"
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBbrew\-cask\fR \- a friendly binary installer for macOS
|
\fBbrew\-cask\fR \- a friendly binary installer for macOS
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "BREW" "1" "March 2018" "Homebrew" "brew"
|
.TH "BREW" "1" "April 2018" "Homebrew" "brew"
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBbrew\fR \- The missing package manager for macOS
|
\fBbrew\fR \- The missing package manager for macOS
|
||||||
@ -1128,6 +1128,10 @@ If set, instructs Homebrew to use the given directory as the download cache\.
|
|||||||
\fIDefault:\fR \fB~/Library/Caches/Homebrew\fR\.
|
\fIDefault:\fR \fB~/Library/Caches/Homebrew\fR\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\fBHOMEBREW_CURLRC\fR
|
||||||
|
If set, Homebrew will not pass \fB\-q\fR when invoking \fBcurl\fR(1) (which disables the use of \fBcurlrc\fR)\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\fBHOMEBREW_CURL_VERBOSE\fR
|
\fBHOMEBREW_CURL_VERBOSE\fR
|
||||||
If set, Homebrew will pass \fB\-\-verbose\fR when invoking \fBcurl\fR(1)\.
|
If set, Homebrew will pass \fB\-\-verbose\fR when invoking \fBcurl\fR(1)\.
|
||||||
.
|
.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user