Skip to content

Commit

Permalink
Poetry Install with pip unavailable shouldn't throw Exception (#4522)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: Bjorn Neergaard <[email protected]>
  • Loading branch information
3 people authored Nov 10, 2021
1 parent 396c06a commit b2aef2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion install-poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,11 @@ def make_env(self, version: str) -> Path:
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)
Expand Down

0 comments on commit b2aef2b

Please sign in to comment.