Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/changelog/3946.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Automatically pass the TERMINFO environment variable to tox subprocesses if the output is a TTY. This variable is used
by Ghostty to communicate terminal capabilities to programs.
4 changes: 2 additions & 2 deletions src/tox/tox_env/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ def _default_pass_env(self) -> list[str]: # noqa: PLR6301
"NETRC", # used by pip and netrc modules
"PYTHON_GIL", # allows controlling python gil
]
if sys.stdout.isatty(): # if we're on a interactive shell pass on the TERM
env.append("TERM")
if sys.stdout.isatty(): # if we're on a interactive shell pass on the TERM and TERMINFO
env.extend(("TERM", "TERMINFO")) # needed when TERM isn't in system terminfo db
if sys.platform == "win32": # pragma: win32 cover
env.extend(
[
Expand Down
2 changes: 1 addition & 1 deletion tests/session/cmd/test_show_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def test_pass_env_config_default(tox_project: ToxProjectCreator, stdout_is_atty:
+ (["SSH_AGENT_PID", "SSH_AUTH_SOCK"] if not is_win else [])
+ ["SSL_CERT_FILE"]
+ (["SYSTEMDRIVE", "SYSTEMROOT", "TEMP"] if is_win else [])
+ (["TERM"] if stdout_is_atty else [])
+ (["TERM", "TERMINFO"] if stdout_is_atty else [])
+ (["TMP", "USERPROFILE"] if is_win else ["TMPDIR"])
+ ["VIRTUALENV_*"]
+ (["WINDIR"] if is_win else [])
Expand Down
Loading