@@ -106,9 +106,9 @@ def _download(path, url, probably_big, verbose, exception):
106
106
107
107
try :
108
108
if (probably_big or verbose ) and "GITHUB_ACTIONS" not in os .environ :
109
- option = "-# "
109
+ option = "--progress-bar "
110
110
else :
111
- option = "-s "
111
+ option = "--silent "
112
112
# If curl is not present on Win32, we should not sys.exit
113
113
# but raise `CalledProcessError` or `OSError` instead
114
114
require (["curl" , "--version" ], exception = platform_is_win32 ())
@@ -120,12 +120,15 @@ def _download(path, url, probably_big, verbose, exception):
120
120
# for consistency.
121
121
# they are also more compreprensivly explained in that file.
122
122
run (["curl" , option ] + extra_flags + [
123
- "-L" , # Follow redirect.
124
- "-y" , "30" , "-Y" , "10" , # timeout if speed is < 10 bytes/sec for > 30 seconds
125
- "--connect-timeout" , "30" , # timeout if cannot connect within 30 seconds
126
- "-o" , path ,
123
+ # Follow redirect.
124
+ "--location" ,
125
+ # timeout if speed is < 10 bytes/sec for > 30 seconds
126
+ "--speed-time" , "30" , "--speed-limit" , "10" ,
127
+ # timeout if cannot connect within 30 seconds
128
+ "--connect-timeout" , "30" ,
129
+ "--output" , path ,
127
130
"--continue-at" , "-" ,
128
- "--retry" , "3" , "-SRf " , url ],
131
+ "--retry" , "3" , "--show-error" , "--remote-time" , "--fail " , url ],
129
132
verbose = verbose ,
130
133
exception = True , # Will raise RuntimeError on failure
131
134
)
0 commit comments