aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils/curl.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-08-21 19:32:16 +0200
committerMarkus Reiter2017-08-21 22:41:13 +0200
commit15e572702e8dbd998e31aec110bce3cc0c9df811 (patch)
treefde33207b043ffd4fd33a9bb2fb139b2eaacd89f /Library/Homebrew/utils/curl.rb
parent85fd43d4fe595f73b9168360b4c15a43e1a9debf (diff)
downloadbrew-15e572702e8dbd998e31aec110bce3cc0c9df811.tar.bz2
Fix `pull`.
Diffstat (limited to 'Library/Homebrew/utils/curl.rb')
-rw-r--r--Library/Homebrew/utils/curl.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/utils/curl.rb b/Library/Homebrew/utils/curl.rb
index 52d03c93e..bc7055c0c 100644
--- a/Library/Homebrew/utils/curl.rb
+++ b/Library/Homebrew/utils/curl.rb
@@ -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