Merge pull request #7233 from vitorgalvao/curl-long-disable

Use long --disable instead of short -q in curl
This commit is contained in:
Mike McQuaid 2020-03-30 08:22:39 +01:00 committed by GitHub
commit 6df0724313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 10 deletions

View File

@ -160,7 +160,7 @@ Note that environment variables must have a value set to be detected. For exampl
`git`(1) remote. If set, instructs Homebrew to instead use the specified URL.
* `HOMEBREW_CURLRC`:
If set, Homebrew will not pass `-q` when invoking `curl`(1), which disables
If set, Homebrew will not pass `--disable` when invoking `curl`(1), which disables
the use of `curlrc`.
* `HOMEBREW_CURL_VERBOSE`:

View File

@ -4,14 +4,14 @@ require "utils/curl"
describe "curl" do
describe "curl_args" do
it "returns -q as the first argument when HOMEBREW_CURLRC is not set" do
# -q must be the first argument according to "man curl"
expect(curl_args("foo").first).to eq("-q")
it "returns --disable as the first argument when HOMEBREW_CURLRC is not set" do
# --disable must be the first argument according to "man curl"
expect(curl_args("foo").first).to eq("--disable")
end
it "doesn't return -q as the first argument when HOMEBREW_CURLRC is set" do
it "doesn't return --disable as the first argument when HOMEBREW_CURLRC is set" do
ENV["HOMEBREW_CURLRC"] = "1"
expect(curl_args("foo").first).not_to eq("-q")
expect(curl_args("foo").first).not_to eq("--disable")
end
it "uses `--retry 3` when HOMEBREW_CURL_RETRIES is unset" do

View File

@ -12,7 +12,7 @@ module Utils
args = []
# do not load .curlrc unless requested (must be the first argument)
args << "-q" unless ENV["HOMEBREW_CURLRC"]
args << "--disable" unless ENV["HOMEBREW_CURLRC"]
args += %W[
--max-time 3

View File

@ -17,7 +17,7 @@ def curl_args(*extra_args, show_output: false, user_agent: :default)
args = []
# do not load .curlrc unless requested (must be the first argument)
args << "-q" unless ENV["HOMEBREW_CURLRC"]
args << "--disable" unless ENV["HOMEBREW_CURLRC"]
args << "--globoff"

View File

@ -1199,7 +1199,7 @@ Note that environment variables must have a value set to be detected. For exampl
`git`(1) remote. If set, instructs Homebrew to instead use the specified URL.
* `HOMEBREW_CURLRC`:
If set, Homebrew will not pass `-q` when invoking `curl`(1), which disables
If set, Homebrew will not pass `--disable` when invoking `curl`(1), which disables
the use of `curlrc`.
* `HOMEBREW_CURL_VERBOSE`:

View File

@ -1495,7 +1495,7 @@ By default, Homebrew uses \fBhttps://github\.com/Homebrew/homebrew\-core\fR (or
.
.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\.
If set, Homebrew will not pass \fB\-\-disable\fR when invoking \fBcurl\fR(1), which disables the use of \fBcurlrc\fR\.
.
.TP
\fBHOMEBREW_CURL_VERBOSE\fR