|
43 | 43 | }
|
44 | 44 |
|
45 | 45 |
|
46 |
| -def run(title, command): |
| 46 | +def run(title, command, check=True): |
47 | 47 | print("::group::" + title, flush=True)
|
48 | 48 | print(command, flush=True)
|
49 | 49 | start = time.monotonic()
|
50 |
| - subprocess.run(shlex.split(command), stderr=subprocess.STDOUT) |
51 |
| - print("Duration:", time.monotonic() - start, flush=True) |
52 |
| - print("::endgroup::", flush=True) |
| 50 | + try: |
| 51 | + subprocess.run(shlex.split(command), stderr=subprocess.STDOUT, check=check) |
| 52 | + finally: |
| 53 | + print("Duration:", time.monotonic() - start, flush=True) |
| 54 | + print("::endgroup::", flush=True) |
53 | 55 |
|
54 | 56 |
|
55 | 57 | run(
|
@@ -106,7 +108,11 @@ def run(title, command):
|
106 | 108 | submodules = " ".join(submodules)
|
107 | 109 | # This line will fail because the submodule's need different commits than the tip of the branch. We
|
108 | 110 | # fix it later.
|
109 |
| - run("Init the submodules we'll need", f"git submodule update --init -N --depth 1 {submodules}") |
| 111 | + run( |
| 112 | + "Init the submodules we'll need", |
| 113 | + f"git submodule update --init -N --depth 1 {submodules}", |
| 114 | + check=False, |
| 115 | + ) |
110 | 116 |
|
111 | 117 | run(
|
112 | 118 | "Fetch the submodule sha",
|
|
0 commit comments