Skip to content
Snippets Groups Projects
Commit ed5e2ea3 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

utils/curl: assume Ruby 2.

parent 495da233
No related branches found
No related tags found
No related merge requests found
......@@ -21,14 +21,8 @@ end
def curl_output(*args)
curl_args = curl_args(args)
curl_args -= ["--fail"]
if RUBY_TWO
curl_args -= ["--silent"]
Open3.popen3(*curl_args) do |_, stdout, stderr, wait_thread|
[stdout.read, stderr.read, wait_thread.value]
end
else
output = Utils.popen_read_text(*curl_args)
[output, nil, $?]
curl_args -= ["--fail", "--silent"]
Open3.popen3(*curl_args) do |_, stdout, stderr, wait_thread|
[stdout.read, stderr.read, wait_thread.value]
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment