mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-31 19:28:55 +00:00
Respect TERM=dumb in test runner to prevent ANSI sequences, color
Fixes: #7137
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user