Fix pull.
This commit is contained in:
parent
85fd43d4fe
commit
15e572702e
@ -587,7 +587,7 @@ module Homebrew
|
||||
# We're in the cache; make sure to force re-download
|
||||
loop do
|
||||
begin
|
||||
curl_download url, to: filename
|
||||
curl_download url, continue_at: 0, to: filename
|
||||
break
|
||||
rescue
|
||||
if retry_count >= max_curl_retries
|
||||
|
||||
@ -37,13 +37,12 @@ def curl(*args)
|
||||
safe_system(*curl_args(*args))
|
||||
end
|
||||
|
||||
def curl_download(*args, to: nil, **options)
|
||||
continue_at ||= "-"
|
||||
curl("--location", "--remote-time", "--continue-at", continue_at, "--output", to, *args, **options)
|
||||
def curl_download(*args, to: nil, continue_at: "-", **options)
|
||||
curl("--location", "--remote-time", "--continue-at", continue_at.to_s, "--output", to, *args, **options)
|
||||
rescue ErrorDuringExecution
|
||||
# `curl` error 33: HTTP server doesn't seem to support byte ranges. Cannot resume.
|
||||
if $CHILD_STATUS.exitstatus == 33 && continue_at == "-"
|
||||
continue_at = "0"
|
||||
continue_at = 0
|
||||
retry
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user