From 9035a862f46163e276f385af3af4eec34c9faabe Mon Sep 17 00:00:00 2001 From: Mick Grove Date: Sat, 6 Sep 2025 15:13:34 -0700 Subject: [PATCH] fixed ascii coloring in update check --- src/reporter/styles.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/reporter/styles.rs b/src/reporter/styles.rs index 263948d..9f96c9c 100644 --- a/src/reporter/styles.rs +++ b/src/reporter/styles.rs @@ -14,13 +14,12 @@ pub struct Styles { is_term: bool, } impl Styles { - pub fn new(_use_color: bool) -> Self { + pub fn new(use_color: bool) -> Self { let stdout_is_tty = std::io::stdout().is_terminal(); let is_term = Term::stdout().is_term(); - let use_color = stdout_is_tty && is_term; // Enable color only if both checks agree it's a terminal - - let styles_enabled = use_color; + // Enable color only when explicitly requested and stdout is a terminal. + let styles_enabled = use_color && stdout_is_tty && is_term; let style_finding_heading = Style::new().bright().white().force_styling(styles_enabled); let style_finding_active_heading = Style::new().bold().bright().cyan().force_styling(styles_enabled);