From 49bd5d86b4fef1069751861ff11b232fd00b499d Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Thu, 3 Sep 2026 12:35:12 -0600 Subject: [PATCH] fix: skip terminal color-scheme queries in test builds --- src/config/app_config.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config/app_config.rs b/src/config/app_config.rs index 4cf4ef4..6bf1576 100644 --- a/src/config/app_config.rs +++ b/src/config/app_config.rs @@ -640,7 +640,10 @@ impl AppConfig { if self.highlight && self.theme.is_none() { if let Some(v) = super::read_env_value::(&get_env_name("theme")) { self.theme = v; - } else if *IS_STDOUT_TERMINAL { + } else if !cfg!(test) && *IS_STDOUT_TERMINAL { + // Never query the terminal from test builds: the test harness + // shares the process TTY, so parallel raw-mode color queries + // garble the runner's output and stall on stolen replies. if let Ok(color_scheme) = color_scheme(QueryOptions::default()) { let theme = match color_scheme { ColorScheme::Dark => "dark",