fix(cli): set TERM, COLORTERM, and LANG defaults for terminal pty sessions (#495)

This commit is contained in:
hu chenxi
2026-04-20 19:47:55 +08:00
committed by GitHub
parent a118b47b41
commit cccee4da63
+9
View File
@@ -68,6 +68,15 @@ function buildFilteredEnv(): NodeJS.ProcessEnv {
}
env[key] = value
}
if (!env.TERM) {
env.TERM = 'xterm-256color'
}
if (!env.COLORTERM) {
env.COLORTERM = 'truecolor'
}
if (!env.LANG) {
env.LANG = process.platform === 'darwin' ? 'en_US.UTF-8' : 'C.UTF-8'
}
return env
}