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:
1 file changed
+2
-1
@@ -11,8 +11,9 @@ import sys
|
|||||||
|
|
||||||
def run(cmd, **kwargs):
|
def run(cmd, **kwargs):
|
||||||
print("+ " + shlex.join(cmd), flush=True)
|
print("+ " + shlex.join(cmd), flush=True)
|
||||||
|
kwargs.setdefault("check", True)
|
||||||
try:
|
try:
|
||||||
return subprocess.run(cmd, check=True, **kwargs)
|
return subprocess.run(cmd, **kwargs)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
sys.exit(e)
|
sys.exit(e)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user