Pass check=False for an expected-fail command

This commit is contained in:
Jeff Epler 2022-07-14 15:16:28 -05:00
parent 104ac5b965
commit 8cdbeb62f6
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 7 additions and 3 deletions

View File

@ -43,12 +43,12 @@ port_deps = {
}
def run(title, command):
def run(title, command, check=True):
print("::group::" + title, flush=True)
print(command, flush=True)
start = time.monotonic()
try:
subprocess.run(shlex.split(command), stderr=subprocess.STDOUT, check=True)
subprocess.run(shlex.split(command), stderr=subprocess.STDOUT, check=check)
finally:
print("Duration:", time.monotonic() - start, flush=True)
print("::endgroup::", flush=True)
@ -108,7 +108,11 @@ if submodules:
submodules = " ".join(submodules)
# This line will fail because the submodule's need different commits than the tip of the branch. We
# fix it later.
run("Init the submodules we'll need", f"git submodule update --init -N --depth 1 {submodules}")
run(
"Init the submodules we'll need",
f"git submodule update --init -N --depth 1 {submodules}",
check=False,
)
run(
"Fetch the submodule sha",