ci: Allow overwriting check option in run() helper

The bool is forced to check=True, but some commands may want to
explicitly use kwargs to disable it.

This refactor is needed for the next commit.
This commit is contained in:
MarcoFalke
2025-10-22 11:57:58 +02:00
parent fa8e4de5c3
commit fa4dbe04d7

View File

@@ -11,8 +11,9 @@ import sys
def run(cmd, **kwargs):
print("+ " + shlex.join(cmd), flush=True)
kwargs.setdefault("check", True)
try:
return subprocess.run(cmd, check=True, **kwargs)
return subprocess.run(cmd, **kwargs)
except Exception as e:
sys.exit(e)