1
0
Fork 0
mirror of https://github.com/python-poetry/install.python-poetry.org.git synced 2024-09-13 13:17:11 -04:00

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>
This commit is contained in:
Nishant Misra 2021-11-10 19:57:47 +05:30 committed by GitHub
parent 396c06a6a9
commit b2aef2b5cd

View file

@ -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)