curl: modified curl to allow optional print_stdout

This commit is contained in:
lionellloh 2020-06-30 01:13:02 +08:00
parent 074f66f912
commit 02bc870e91

View File

@ -44,12 +44,12 @@ def curl_args(*extra_args, show_output: false, user_agent: :default)
args + extra_args args + extra_args
end end
def curl(*args, secrets: [], **options) def curl(*args, print_stdout: true, secrets: [], **options)
# SSL_CERT_FILE can be incorrectly set by users or portable-ruby and screw # SSL_CERT_FILE can be incorrectly set by users or portable-ruby and screw
# with SSL downloads so unset it here. # with SSL downloads so unset it here.
system_command! curl_executable, system_command! curl_executable,
args: curl_args(*args, **options), args: curl_args(*args, **options),
print_stdout: true, print_stdout: print_stdout,
env: { "SSL_CERT_FILE" => nil }, env: { "SSL_CERT_FILE" => nil },
secrets: secrets secrets: secrets
end end