Prevent .curlrc from being loaded.

This commit is contained in:
Stefan Sundin 2018-04-05 14:48:35 -07:00
parent 94c0d833c3
commit 0ec47813f1
3 changed files with 12 additions and 0 deletions

View File

@ -48,6 +48,7 @@ fetch() {
local temporary_path
curl_args=(
-q # do not load .curlrc (must be the first argument)
--fail
--remote-time
--location

View File

@ -0,0 +1,10 @@
require "utils/curl"
describe "curl" do
describe "curl_args" do
it "returns -q as the first argument" do
# -q must be the first argument according to "man curl"
expect(curl_args("foo")[1]).to eq("-q")
end
end
end

View File

@ -14,6 +14,7 @@ end
def curl_args(*extra_args, show_output: false, user_agent: :default)
args = [
curl_executable.to_s,
"-q", # do not load .curlrc (must be the first argument)
"--show-error",
]