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
  • Loading branch information
mkniewallner authored Aug 26, 2021
1 parent c967a4a commit 893fe1b
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

1 comment on commit 893fe1b

@charterchap
Copy link

@charterchap charterchap commented on 893fe1b Aug 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks python < 3.7: #4441

Please sign in to comment.