Fix argument order
This commit is contained in:
parent
7637fd5366
commit
16e7072543
@ -119,6 +119,8 @@ module Utils
|
|||||||
end
|
end
|
||||||
|
|
||||||
def parse_headers(headers)
|
def parse_headers(headers)
|
||||||
|
return {} unless headers
|
||||||
|
|
||||||
headers.split("\n").to_h do |h|
|
headers.split("\n").to_h do |h|
|
||||||
partitioned = h.partition(": ")
|
partitioned = h.partition(": ")
|
||||||
[partitioned.first, partitioned.last]
|
[partitioned.first, partitioned.last]
|
||||||
@ -145,10 +147,9 @@ module Utils
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
args = ["--location", "--remote-time", "--output", destination] + args
|
||||||
args += ["--location", "--remote-time", "--output", destination]
|
|
||||||
# continue-at shouldn't be used with servers that don't support partial requests.
|
# continue-at shouldn't be used with servers that don't support partial requests.
|
||||||
args += ["--continue-at", "-"] if destination.exist? && supports_partial
|
args = ["--continue-at", "-"] + args if destination.exist? && supports_partial
|
||||||
|
|
||||||
curl(*args, **options)
|
curl(*args, **options)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user