Skip to content

Commit

Permalink
Split stdout and stderr in EnvCommandError
Browse files Browse the repository at this point in the history
  • Loading branch information
jleclanche committed Sep 30, 2022
1 parent af9c07a commit f5f4bc4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/poetry/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,13 @@ def __init__(self, e: CalledProcessError, input: str | None = None) -> None:
self.e = e

message = (
f"Command {e.cmd} errored with the following return code {e.returncode},"
f" and output: \n{decode(e.output)}"
f"Command {e.cmd} errored with the following return code {e.returncode}\n"
f"Full output:\n{decode(e.output)}\n"
)
if e.stderr:
message += f"\nError output:\n{decode(e.stderr)}\n"
if input:
message += f"input was : {input}"
message += f"\ninput was : {input}"
super().__init__(message)


Expand Down

0 comments on commit f5f4bc4

Please sign in to comment.