Skip to content

Commit 8cdbeb6

Browse files
committed
Pass check=False for an expected-fail command
1 parent 104ac5b commit 8cdbeb6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tools/ci_fetch_deps.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
}
4444

4545

46-
def run(title, command):
46+
def run(title, command, check=True):
4747
print("::group::" + title, flush=True)
4848
print(command, flush=True)
4949
start = time.monotonic()
5050
try:
51-
subprocess.run(shlex.split(command), stderr=subprocess.STDOUT, check=True)
51+
subprocess.run(shlex.split(command), stderr=subprocess.STDOUT, check=check)
5252
finally:
5353
print("Duration:", time.monotonic() - start, flush=True)
5454
print("::endgroup::", flush=True)
@@ -108,7 +108,11 @@ def run(title, command):
108108
submodules = " ".join(submodules)
109109
# This line will fail because the submodule's need different commits than the tip of the branch. We
110110
# fix it later.
111-
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+
)
112116

113117
run(
114118
"Fetch the submodule sha",

0 commit comments

Comments
 (0)