Skip to content

Commit

Permalink
Add windir to the default list of Windows pass_env variables
Browse files Browse the repository at this point in the history
Fixes #3302
  • Loading branch information
kurtmckee committed Jul 1, 2024
1 parent 698f1dd commit 8aa94b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/changelog/3302.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Add ``windir`` to the default list of Windows ``pass_env`` environment variables. - by :user:`kurtmckee`
1 change: 1 addition & 0 deletions src/tox/tox_env/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def _default_pass_env(self) -> list[str]: # noqa: PLR6301
"USERPROFILE", # needed for `os.path.expanduser()`
"PATHEXT", # needed for discovering executables
"MSYSTEM", # controls paths printed format
"WINDIR", # base path to system executables and DLLs
],
)
else: # pragma: win32 no cover
Expand Down
1 change: 1 addition & 0 deletions tests/session/cmd/test_show_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def test_pass_env_config_default(tox_project: ToxProjectCreator, stdout_is_atty:
+ (["TERM"] if stdout_is_atty else [])
+ (["TMP", "USERPROFILE"] if is_win else ["TMPDIR"])
+ ["VIRTUALENV_*", "http_proxy", "https_proxy", "no_proxy"]
+ (["WINDIR"] if is_win else [])
)
assert pass_env == expected

Expand Down

0 comments on commit 8aa94b1

Please sign in to comment.