Skip to content

Commit

Permalink
driver: Only output ANSI if connected to a terminal
Browse files Browse the repository at this point in the history
See #78435 for more.
  • Loading branch information
camelid committed Oct 29, 2020
1 parent 6bdae9e commit d282aca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d282aca

Please sign in to comment.