termio: don't leak VTE_VERSION into child processes (#4710)

This variable is set by gnome-terminal and other VTE-based terminals. We
don't want our child processes to think we're running under VTE.

See #4494
pull/4742/head
Mitchell Hashimoto 2025-01-06 16:38:40 -08:00 committed by GitHub
commit a3837a1e4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -856,7 +856,11 @@ const Subprocess = struct {
env.remove("GHOSTTY_MAC_APP"); env.remove("GHOSTTY_MAC_APP");
} }
// Don't leak these environment variables to child processes. // VTE_VERSION is set by gnome-terminal and other VTE-based terminals.
// We don't want our child processes to think we're running under VTE.
env.remove("VTE_VERSION");
// Don't leak these GTK environment variables to child processes.
if (comptime build_config.app_runtime == .gtk) { if (comptime build_config.app_runtime == .gtk) {
env.remove("GDK_DEBUG"); env.remove("GDK_DEBUG");
env.remove("GDK_DISABLE"); env.remove("GDK_DISABLE");