aboutsummaryrefslogtreecommitdiffstats
path: root/jprov/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'jprov/runner.py')
-rw-r--r--jprov/runner.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/jprov/runner.py b/jprov/runner.py
index 88dfe7f..0f0a629 100644
--- a/jprov/runner.py
+++ b/jprov/runner.py
@@ -58,6 +58,11 @@ def run(
fh.write(stderr)
if proc.returncode != 0 and not allow_fail:
- raise RuntimeError(f"command failed: {' '.join(cmd_list)} (exit {proc.returncode})")
+ detail = ""
+ if stderr:
+ detail = f" stderr: {stderr.strip()}"
+ raise RuntimeError(
+ f"command failed: {' '.join(cmd_list)} (exit {proc.returncode}){detail}"
+ )
return RunResult(cmd=cmd_list, returncode=proc.returncode, stdout=stdout, stderr=stderr)