mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-15 07:52:39 +00:00
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' Github-Pull: #34461 Rebased-From: 2222dadabbbd03be9b4b917583fd51b34857f40c
This commit is contained in:
parent
7317a0ba1f
commit
f5d4dc9419
5
.github/ci-test-each-commit-exec.py
vendored
5
.github/ci-test-each-commit-exec.py
vendored
@ -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():
|
||||
|
||||
@ -14,7 +14,7 @@ def run(cmd, **kwargs):
|
||||
try:
|
||||
return subprocess.run(cmd, check=True, **kwargs)
|
||||
except Exception as e:
|
||||
sys.exit(e)
|
||||
sys.exit(str(e))
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user