mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-26 09:30:37 +00:00
show more context for zenith cli run errors
This commit is contained in:
@@ -185,12 +185,16 @@ class ZenithCli:
|
||||
universal_newlines=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
except subprocess.CalledProcessError as err:
|
||||
print(f"Run failed: {err}")
|
||||
print(f" stdout: {err.stdout}")
|
||||
print(f" stderr: {err.stderr}")
|
||||
except subprocess.CalledProcessError as exc:
|
||||
# this way command output will be in recorded and shown in CI in failure message
|
||||
msg = f"""\
|
||||
Run failed: {exc}
|
||||
stdout: {exc.stdout}
|
||||
stderr: {exc.stderr}
|
||||
"""
|
||||
print(msg)
|
||||
|
||||
raise err
|
||||
raise Exception(msg) from exc
|
||||
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user