1
0
Fork 0
mirror of https://github.com/python-poetry/install.python-poetry.org.git synced 2024-11-05 21:55:51 -05:00

fix(install-poetry): check for returncode when pip installing Poetry (#4425)

This commit is contained in:
Mathieu Kniewallner 2021-08-26 14:36:08 +02:00 committed by GitHub
parent 04120853ef
commit 0e3b144488

View file

@ -439,8 +439,9 @@ class Installer:
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
@ -583,8 +584,8 @@ class Installer:
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: