@@ -106,9 +106,9 @@ def _download(path, url, probably_big, verbose, exception):
106106
107107 try :
108108 if (probably_big or verbose ) and "GITHUB_ACTIONS" not in os .environ :
109- option = "-# "
109+ option = "--progress-bar "
110110 else :
111- option = "-s "
111+ option = "--silent "
112112 # If curl is not present on Win32, we should not sys.exit
113113 # but raise `CalledProcessError` or `OSError` instead
114114 require (["curl" , "--version" ], exception = platform_is_win32 ())
@@ -120,12 +120,15 @@ def _download(path, url, probably_big, verbose, exception):
120120 # for consistency.
121121 # they are also more compreprensivly explained in that file.
122122 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 ,
127130 "--continue-at" , "-" ,
128- "--retry" , "3" , "-SRf " , url ],
131+ "--retry" , "3" , "--show-error" , "--remote-time" , "--fail " , url ],
129132 verbose = verbose ,
130133 exception = True , # Will raise RuntimeError on failure
131134 )
0 commit comments