Skip to content

Commit 0cf41c1

Browse files
Pass LOCALAPPDATA by default on Windows (#3639) (#3640)
1 parent 1ea39ba commit 0cf41c1

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
@@ -126,6 +126,7 @@ def test_pass_env_config_default(tox_project: ToxProjectCreator, stdout_is_atty:
126126
+ (["COMSPEC"] if is_win else [])
127127
+ ["CPPFLAGS", "CURL_CA_BUNDLE", "CXX", "FORCE_COLOR", "HOME", "LANG"]
128128
+ ["LANGUAGE", "LDFLAGS", "LD_LIBRARY_PATH"]
129+
+ (["LOCALAPPDATA"] if is_win else [])
129130
+ (["MSYSTEM"] if is_win else [])
130131
+ ["NETRC"]
131132
+ (["NIX_LD", "NIX_LD_LIBRARY_PATH"] if not is_win else [])

0 commit comments

Comments
 (0)