about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-05-02 13:26:52 +0000
committerbors <bors@rust-lang.org>2019-05-02 13:26:52 +0000
commitd15fc173818ccea6f8d97af13a30d454f9e4b35c (patch)
treed7c164bbb049a4eb97afd643e6a754f2aa77b57b
parent758dc9af504e2fe75813bd362619231ecc727898 (diff)
parenta0d63354f231ddec9b426f89420464fbaabcf410 (diff)
downloadrust-d15fc173818ccea6f8d97af13a30d454f9e4b35c.tar.gz
rust-d15fc173818ccea6f8d97af13a30d454f9e4b35c.zip
Auto merge of #60379 - froydnj:bootstrap-progress-fixes, r=kennytm
intelligently handle older version of git in bootstrap

If we fail to run with `--progress`, try running without instead.

Fixes #57080.
-rw-r--r--src/bootstrap/bootstrap.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 8af7aa4856c..86c82adffa9 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -677,9 +677,15 @@ class RustBuild(object):
 
         run(["git", "submodule", "-q", "sync", module],
             cwd=self.rust_root, verbose=self.verbose)
-        run(["git", "submodule", "update",
-            "--init", "--recursive", "--progress", module],
-            cwd=self.rust_root, verbose=self.verbose)
+        try:
+            run(["git", "submodule", "update",
+                 "--init", "--recursive", "--progress", module],
+                cwd=self.rust_root, verbose=self.verbose, exception=True)
+        except RuntimeError:
+            # Some versions of git don't support --progress.
+            run(["git", "submodule", "update",
+                 "--init", "--recursive", module],
+                cwd=self.rust_root, verbose=self.verbose)
         run(["git", "reset", "-q", "--hard"],
             cwd=module_path, verbose=self.verbose)
         run(["git", "clean", "-qdfx"],