diff --git a/nextest-runner/src/reporter/displayer/progress.rs b/nextest-runner/src/reporter/displayer/progress.rs index 5b88d676282..28da39e3b2d 100644 --- a/nextest-runner/src/reporter/displayer/progress.rs +++ b/nextest-runner/src/reporter/displayer/progress.rs @@ -505,18 +505,22 @@ fn supports_osc_9_4(stream: &dyn IsTerminal) -> bool { ); return false; } - if std::env::var("WT_SESSION").is_ok() { + if std::env::var_os("WT_SESSION").is_some() { debug!("autodetect terminal progress reporting: enabling since WT_SESSION is set"); return true; }; - if std::env::var("ConEmuANSI").ok() == Some("ON".into()) { + if std::env::var_os("ConEmuANSI").is_some_and(|term| term == "ON") { debug!("autodetect terminal progress reporting: enabling since ConEmuANSI is ON"); return true; } - if std::env::var("TERM_PROGRAM").ok() == Some("WezTerm".into()) { + if std::env::var_os("TERM_PROGRAM").is_some_and(|term| term == "WezTerm") { debug!("autodetect terminal progress reporting: enabling since TERM_PROGRAM is WezTerm"); return true; } + if std::env::var_os("TERM_PROGRAM").is_some_and(|term| term == "ghostty") { + debug!("autodetect terminal progress reporting: enabling since TERM_PROGRAM is Ghostty"); + return true; + } false }