Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.1 kB · 35 lines
123456789101112131415161718192021222324252627282930313233343536diff --git a/nox/command.py b/nox/command.pyindex 671875c..4984168 100644--- a/nox/command.py+++ b/nox/command.py@@ -30,6 +30,8 @@ TYPE_CHECKING = False if TYPE_CHECKING: from typing import IO +_PLATFORM = sys.platform+ ExternalType = Literal["error", True, False] @@ -63,7 +65,7 @@ def _clean_env(env: Mapping[str, str | None] | None = None) -> dict[str, str] | clean_env = {k: v for k, v in env.items() if v is not None} # Ensure systemroot is passed down, otherwise Windows will explode.- if sys.platform == "win32":+ if _PLATFORM.startswith("win"): clean_env.setdefault("SYSTEMROOT", os.environ.get("SYSTEMROOT", "")) return clean_envdiff --git a/tests/test_command.py b/tests/test_command.pyindex ae398e9..904cf34 100644--- a/tests/test_command.py+++ b/tests/test_command.py@@ -157,7 +157,7 @@ def test_run_env_remove(monkeypatch): ) -@mock.patch("sys.platform", "win32")+@mock.patch("nox.command._PLATFORM", "win32") def test_run_env_systemroot(): systemroot = os.environ.setdefault("SYSTEMROOT", "sigil")