From b2aef2b5cd8df2cfc570320885c98d5c170d5b61 Mon Sep 17 00:00:00 2001 From: Nishant Misra <2412924+sci-c0@users.noreply.github.com> Date: Wed, 10 Nov 2021 19:57:47 +0530 Subject: [PATCH] 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 Co-authored-by: Bjorn Neergaard --- install-poetry.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install-poetry.py b/install-poetry.py index 4b47d82..c532a93 100644 --- a/install-poetry.py +++ b/install-poetry.py @@ -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)