Skip to content

Commit 214f090

Browse files
Pass LOCALAPPDATA by default on Windows (#3639)
1 parent 1ea39ba commit 214f090

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

docs/changelog/3639.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added 'LocalAppData' to the default passed environment variables on Windows.

docs/config.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,10 @@ Base options
504504
- ❌
505505
- ❌
506506
- ✅
507+
* - LOCALAPPDATA
508+
- ❌
509+
- ❌
510+
- ✅
507511
* - PROGRAMDATA
508512
- ❌
509513
- ❌

src/tox/tox_env/python/api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def _default_pass_env(self) -> list[str]:
131131
env.extend(
132132
[
133133
"APPDATA", # Needed for PIP platformsdirs.windows
134+
"LOCALAPPDATA", # Needed for pymanager
134135
"PROGRAMDATA", # needed for discovering the VS compiler
135136
"PROGRAMFILES(x86)", # needed for discovering the VS compiler
136137
"PROGRAMFILES", # needed for discovering the VS compiler

tests/session/cmd/test_show_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def test_pass_env_config_default(tox_project: ToxProjectCreator, stdout_is_atty:
122122
expected = (
123123
[]
124124
+ (["APPDATA"] if is_win else [])
125+
+ (["LOCALAPPDATA"] if is_win else [])
125126
+ ["CC", "CCSHARED", "CFLAGS"]
126127
+ (["COMSPEC"] if is_win else [])
127128
+ ["CPPFLAGS", "CURL_CA_BUNDLE", "CXX", "FORCE_COLOR", "HOME", "LANG"]

0 commit comments

Comments
 (0)