1
0
Fork 0
mirror of https://github.com/python-poetry/install.python-poetry.org.git synced 2024-11-24 23:10:57 -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: try:
self.install(version) self.install(version)
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
print(colorize("error", "An error has occured: {}".format(str(e)))) print(
print(e.output.decode()) colorize("error", f"\nAn error has occurred: {e}\n{e.stderr.decode()}")
)
return e.returncode return e.returncode
@ -583,8 +584,8 @@ class Installer:
subprocess.run( subprocess.run(
[str(python), "-m", "pip", "install", specification], [str(python), "-m", "pip", "install", specification],
stdout=subprocess.PIPE, capture_output=True,
stderr=subprocess.STDOUT, check=True,
) )
def display_pre_message(self) -> None: def display_pre_message(self) -> None: