Skip to content

Commit

Permalink
continue with _IS_MINGW flag
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Dec 28, 2024
1 parent 53d3787 commit 509916f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nox/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")]

Expand Down

0 comments on commit 509916f

Please sign in to comment.