From 95b1d71a1bec4a2184a54ef80cbceb4a0fea7665 Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Fri, 8 Apr 2022 14:45:47 +0800 Subject: [PATCH] [bootstrap.py] Instruct curl to follow redirect Some RUSTUP_DIST_SERVER perform redirection when downloading stage0 compiler. Curl should be able to follow that. --- src/bootstrap/bootstrap.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 0b6bdf474195d..ab3d3e00e9126 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -122,6 +122,7 @@ def _download(path, url, probably_big, verbose, exception, help_on_error=None): option = "-s" require(["curl", "--version"]) run(["curl", option, + "-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 "--retry", "3", "-Sf", "-o", path, url],