Skip to content

Commit

Permalink
fix(install-poetry): check for returncode when pip installing Poetry …
Browse files Browse the repository at this point in the history
…(#4425)
  • Loading branch information
mkniewallner authored Aug 26, 2021
1 parent 0412085 commit 0e3b144
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions install-poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,9 @@ def _is_self_upgrade_supported(x):
try:
self.install(version)
except subprocess.CalledProcessError as e:
print(colorize("error", "An error has occured: {}".format(str(e))))
print(e.output.decode())
print(
colorize("error", f"\nAn error has occurred: {e}\n{e.stderr.decode()}")
)

return e.returncode

Expand Down Expand Up @@ -583,8 +584,8 @@ def install_poetry(self, version: str, env_path: Path) -> None:

subprocess.run(
[str(python), "-m", "pip", "install", specification],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
capture_output=True,
check=True,
)

def display_pre_message(self) -> None:
Expand Down

0 comments on commit 0e3b144

Please sign in to comment.