Skip to content

Commit e397d22

Browse files
committed
ENH: raise SystemExit when calling meson fails
Fixes mesonbuild#228.
1 parent 47363b5 commit e397d22

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mesonpy/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,9 @@ def _get_config_key(self, key: str) -> Any:
649649
def _proc(self, *args: str) -> None:
650650
"""Invoke a subprocess."""
651651
print('{cyan}{bold}+ {}{reset}'.format(' '.join(args), **_STYLES))
652-
subprocess.check_call(list(args), env=self._env)
652+
r = subprocess.run(list(args), env=self._env)
653+
if r.returncode != 0:
654+
raise SystemExit(r.returncode)
653655

654656
def _meson(self, *args: str) -> None:
655657
"""Invoke Meson."""

0 commit comments

Comments
 (0)