diff --git a/README.md b/README.md index 0044926..6b23f91 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ This supplemental licensing supersedes any language in the generic license attac none of this supplemental license applies to you. # Releases - * 1.3.3 - Isolation for pip too so that it doesn't bind to the parent pip. + * 1.3.4 - Isolation for pip too so that it doesn't bind to the parent pip. * 1.3.1 - New `full_isolation` mode to allow packages installed on other parts of the system from binding. * 1.3.1 - Update readme. * 1.3.0 - Marks a new interface. diff --git a/pyproject.toml b/pyproject.toml index 3f777a8..152968c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ dependencies = [ "setuptools", ] # Change this with the version number bump. -version = "1.3.3" +version = "1.3.4" [tool.ruff] line-length = 200 diff --git a/src/isolated_environment/api.py b/src/isolated_environment/api.py index 2bcb7dc..e47e3cc 100644 --- a/src/isolated_environment/api.py +++ b/src/isolated_environment/api.py @@ -239,14 +239,24 @@ def run(self, cmd_list: list[str], **kwargs) -> subprocess.CompletedProcess: text = kwargs.get("text", universal_newlines) if "text" in kwargs: del kwargs["text"] - if cmd_list and ( - cmd_list[0] == "python" - or cmd_list[0] == "python.exe" - or cmd_list[0] == "python3" + if ( + cmd_list + and self.full_isolation + and ( + cmd_list[0] == "python" + or cmd_list[0] == "python.exe" + or cmd_list[0] == "python3" + ) ): cmd_list[0] = str(act_env.python) - if cmd_list and ( - cmd_list[0] == "pip" or cmd_list[0] == "pip.exe" or cmd_list[0] == "pip3" + if ( + cmd_list + and self.full_isolation + and ( + cmd_list[0] == "pip" + or cmd_list[0] == "pip.exe" + or cmd_list[0] == "pip3" + ) ): cmd_list[0] = str(act_env.pip) cp = subprocess.run(