Commit 07245670 by Nishant Misra Committed by GitHub

Poetry Install with `pip` unavailable shouldn't throw Exception (#4522)

When installing Poetry through `install-poetry.py`, if `pip` is not
available, Exception should not be raised, rather installation should
be aborted with user-friendly error msg.

Fixes #4521

Co-authored-by: TurtleNishant <nishant@turtlelectric.com>
Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
parent 5dcf24da
......@@ -516,10 +516,11 @@ class Installer:
env_path = self._data_dir.joinpath("venv")
with temporary_directory() as tmp_dir:
subprocess.call(
subprocess.run(
[sys.executable, "-m", "pip", "install", "virtualenv", "-t", tmp_dir],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
check=True,
)
sys.path.insert(0, tmp_dir)
......
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