From 509916fb0c4d5ebf0395792e268f698055963a06 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Sat, 28 Dec 2024 15:34:19 +0000 Subject: [PATCH] continue with _IS_MINGW flag --- nox/virtualenv.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nox/virtualenv.py b/nox/virtualenv.py index 8a83a106..87df09ec 100644 --- a/nox/virtualenv.py +++ b/nox/virtualenv.py @@ -23,6 +23,7 @@ import shutil import subprocess import sys +import sysconfig from pathlib import Path from socket import gethostbyname from typing import TYPE_CHECKING, Any, ClassVar @@ -65,6 +66,7 @@ def __dir__() -> list[str]: # Use for test mocking and to make mypy happy _PLATFORM = sys.platform +_IS_MINGW = sysconfig.get_platform().startswith("mingw") # Problematic environment variables that are stripped from all commands inside @@ -632,7 +634,7 @@ def _resolved_interpreter(self) -> str: @property def bin_paths(self) -> list[str]: """Returns the location of the virtualenv's bin folder.""" - if _PLATFORM.startswith("win"): + if _PLATFORM.startswith("win") and not _IS_MINGW: return [os.path.join(self.location, "Scripts")] return [os.path.join(self.location, "bin")]