Skip to content

Commit dc7fae9

Browse files
committed
CI: Fix ci_lib and test_lib have_<cmd>() when <cmd> exits abnormally
We were not raising CalledProcessError when exit status != 0.
1 parent 885c6de commit dc7fae9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.ci/ci_lib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def _have_cmd(args):
5858
try:
5959
subprocess.run(
6060
args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
61+
check=True,
6162
)
6263
except OSError as exc:
6364
if exc.errno == errno.ENOENT:

tests/testlib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def _have_cmd(args):
160160
try:
161161
subprocess.run(
162162
args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
163+
check=True,
163164
)
164165
except OSError as exc:
165166
if exc.errno == errno.ENOENT:

0 commit comments

Comments
 (0)