ci: [refactor] Allow overwriting check option in run helper
What changed, and why it matters
This is a tiny internal cleanup in Bitcoin Core's continuous integration (CI) scripts. It makes two helper functions behave identically and lets callers override a default option. It does not touch wallet, networking, consensus, or any user-facing code, and the commit message explicitly says it changes no behavior.
No security action needed. Treat as normal code-quality / CI maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit refactors two Python CI helper run() functions so both use kwargs.setdefault("check", True) before delegating to subprocess.run, and both call sys.exit(str(e)) on exception. Previously one helper hardcoded check=True while the other did not set a default. The change only affects how CI containers and per-commit test scripts invoke subprocesses; it does not alter command arguments, privilege boundaries, or Bitcoin Core runtime logic.
Changed components
.github/ci-test-each-commit-exec.pyci/test/02_run_container.pyInspect captured patch +4 / −3
diff --git a/.github/ci-test-each-commit-exec.py b/.github/ci-test-each-commit-exec.py
index b81241bc..c8ec16ef 100755
--- a/.github/ci-test-each-commit-exec.py
+++ b/.github/ci-test-each-commit-exec.py
@@ -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():
diff --git a/ci/test/02_run_container.py b/ci/test/02_run_container.py
index 921c5d14..dce3730a 100755
--- a/ci/test/02_run_container.py
+++ b/ci/test/02_run_container.py
@@ -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():
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.