Skip to content

Commit d15fc17

Browse files
committed
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.
2 parents 758dc9a + a0d6335 commit d15fc17

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/bootstrap/bootstrap.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -677,9 +677,15 @@ def update_submodule(self, module, checked_out, recorded_submodules):
677677

678678
run(["git", "submodule", "-q", "sync", module],
679679
cwd=self.rust_root, verbose=self.verbose)
680-
run(["git", "submodule", "update",
681-
"--init", "--recursive", "--progress", module],
682-
cwd=self.rust_root, verbose=self.verbose)
680+
try:
681+
run(["git", "submodule", "update",
682+
"--init", "--recursive", "--progress", module],
683+
cwd=self.rust_root, verbose=self.verbose, exception=True)
684+
except RuntimeError:
685+
# Some versions of git don't support --progress.
686+
run(["git", "submodule", "update",
687+
"--init", "--recursive", module],
688+
cwd=self.rust_root, verbose=self.verbose)
683689
run(["git", "reset", "-q", "--hard"],
684690
cwd=module_path, verbose=self.verbose)
685691
run(["git", "clean", "-qdfx"],

0 commit comments

Comments
 (0)