Commit 893fe1bc by Mathieu Kniewallner Committed by GitHub

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

parent c967a4a5
...@@ -439,8 +439,9 @@ class Installer: ...@@ -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: ...@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment