Skip to content

Commit a4d4b4c

Browse files
committed
debug
1 parent 93777a4 commit a4d4b4c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.evergreen/scripts/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,10 @@ def run_command(cmd: str | list[str], **kwargs: Any) -> None:
136136
cmd = " ".join(cmd)
137137
LOGGER.info("Running command '%s'...", cmd)
138138
kwargs.setdefault("check", True)
139-
subprocess.run(shlex.split(cmd), **kwargs) # noqa: PLW1510, S603
139+
try:
140+
subprocess.run(shlex.split(cmd), **kwargs) # noqa: PLW1510, S603
141+
except subprocess.CalledProcessError as e:
142+
LOGGER.error(e.output)
143+
LOGGER.error(str(e))
144+
sys.exit(e.returncode)
140145
LOGGER.info("Running command '%s'... done.", cmd)

0 commit comments

Comments
 (0)