SCons: Refactor color.py

This commit is contained in:
Thaddeus Crews 2025-03-25 12:20:00 -05:00
parent 1ba856565d
commit 2b1f463de5
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84
6 changed files with 111 additions and 90 deletions

View file

@ -428,9 +428,9 @@ def use_windows_spawn_fix(self, platform=None):
def no_verbose(env):
from misc.utility.color import Ansi
from misc.utility.color import Ansi, is_stdout_color
colors = [Ansi.BLUE, Ansi.BOLD, Ansi.REGULAR, Ansi.RESET]
colors = [Ansi.BLUE, Ansi.BOLD, Ansi.REGULAR, Ansi.RESET] if is_stdout_color() else ["", "", "", ""]
# There is a space before "..." to ensure that source file names can be
# Ctrl + clicked in the VS Code terminal.