Respect TERM=dumb in test runner to prevent ANSI sequences, color

Fixes: #7137
This commit is contained in:
mo
2026-07-30 11:39:56 +12:00
parent 9a214f5564
commit 629676217f

View File

@@ -281,6 +281,15 @@ runner :: proc(internal_tests: []Internal_Test) -> bool {
global_log_colors_disabled = !terminal.color_enabled || !terminal.is_terminal(os.stderr)
global_ansi_disabled = !terminal.is_terminal(os.stdout)
buf: [128]u8
if term, err := os.lookup_env(buf[:], "TERM"); err == nil {
// "dumb" terminal overrides all other color and ansi capabilities logic
if term == "dumb" {
global_ansi_disabled = true
global_log_colors_disabled = true
}
}
should_show_animations := FANCY_OUTPUT && terminal.color_enabled && !global_ansi_disabled
// -- Parse CLI options