ci: [refactor] Allow overwriting check option in run helper

Also, use str(e) consistently in all run helpers.

This refactor does not change any behavior.

This can be reviewed by checking that all instances are exactly
identical code now:
$ git grep --function-context 'def run(cmd'
This commit is contained in:
MarcoFalke committed 2026-01-30 12:57:58 +01:00
1 parent 01651324f4
commit 2222dadabb
2 files changed
+4 -3

No files matched your search

+3 -2
View File
@@ -10,10 +10,11 @@ import shlex
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)
sys.exit(str(e))
def main():
+1 -1
View File
@@ -17,7 +17,7 @@ def run(cmd, **kwargs):
try:
return subprocess.run(cmd, **kwargs)
except Exception as e:
sys.exit(e)
sys.exit(str(e))
def main():