diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 29771bee9aeb5..9b5b08bce619d 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -1286,7 +1286,7 @@ pub fn init_env_logger(env: &str) { let filter = tracing_subscriber::EnvFilter::from_env(env); let layer = tracing_tree::HierarchicalLayer::default() .with_indent_lines(true) - .with_ansi(true) + .with_ansi(stdout_isatty()) .with_targets(true) .with_thread_ids(true) .with_thread_names(true)