about summary refs log tree commit diff
path: root/src/bootstrap/bootstrap.py
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2024-09-05 15:12:15 -0400
committerbinarycat <binarycat@envs.net>2024-09-05 15:25:51 -0400
commit757affd1a9147f4ccc0481df6037a867e0a21ad7 (patch)
treed5d5b4b42987c0b75d01e7f1b4adcd6297e5cb9d /src/bootstrap/bootstrap.py
parent44fac8934a3b92cc4bfb87dead31f90aa75683ee (diff)
downloadrust-757affd1a9147f4ccc0481df6037a867e0a21ad7.tar.gz
rust-757affd1a9147f4ccc0481df6037a867e0a21ad7.zip
bootstrap: pass long options to curl
Diffstat (limited to 'src/bootstrap/bootstrap.py')
-rw-r--r--src/bootstrap/bootstrap.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 1de010dc08a..f1d45c880ee 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -106,9 +106,9 @@ def _download(path, url, probably_big, verbose, exception):
 
     try:
         if (probably_big or verbose) and "GITHUB_ACTIONS" not in os.environ:
-            option = "-#"
+            option = "--progress-bar"
         else:
-            option = "-s"
+            option = "--silent"
         # If curl is not present on Win32, we should not sys.exit
         #   but raise `CalledProcessError` or `OSError` instead
         require(["curl", "--version"], exception=platform_is_win32())
@@ -120,12 +120,15 @@ def _download(path, url, probably_big, verbose, exception):
         # for consistency.
         # they are also more compreprensivly explained in that file.
         run(["curl", option] + extra_flags + [
-            "-L", # Follow redirect.
-            "-y", "30", "-Y", "10",    # timeout if speed is < 10 bytes/sec for > 30 seconds
-            "--connect-timeout", "30",  # timeout if cannot connect within 30 seconds
-            "-o", path,
+            # Follow redirect.
+            "--location",
+            # timeout if speed is < 10 bytes/sec for > 30 seconds
+            "--speed-time", "30", "--speed-limit", "10",
+            # timeout if cannot connect within 30 seconds
+            "--connect-timeout", "30",
+            "--output", path,
             "--continue-at", "-",
-            "--retry", "3", "-SRf", url],
+            "--retry", "3", "--show-error", "--remote-time", "--fail", url],
             verbose=verbose,
             exception=True, # Will raise RuntimeError on failure
         )