From d491da2a77341ff9a52c1b0d4258615a5d446d46 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Wed, 17 Sep 2025 18:19:31 -0500 Subject: [PATCH] fix!: use stdin to infer colors instead of stdout --- crates/turborepo-ui/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/turborepo-ui/src/lib.rs b/crates/turborepo-ui/src/lib.rs index 2a4be50ead9f6..ccfc0f83e496d 100644 --- a/crates/turborepo-ui/src/lib.rs +++ b/crates/turborepo-ui/src/lib.rs @@ -153,7 +153,7 @@ impl ColorConfig { Self { should_strip_ansi } } - /// Infer the color choice from environment variables and checking if stdout + /// Infer the color choice from environment variables and checking if stdin /// is a tty pub fn infer() -> Self { let env_setting = @@ -164,7 +164,7 @@ impl ColorConfig { "true" | "1" | "2" | "3" => Some(false), _ => None, }); - let should_strip_ansi = env_setting.unwrap_or_else(|| !atty::is(atty::Stream::Stdout)); + let should_strip_ansi = env_setting.unwrap_or_else(|| !atty::is(atty::Stream::Stdin)); Self { should_strip_ansi } }