diff options
| author | Camelid <camelidcamel@gmail.com> | 2020-10-29 16:54:59 -0700 |
|---|---|---|
| committer | Camelid <camelidcamel@gmail.com> | 2020-10-29 16:54:59 -0700 |
| commit | d282aca273d9a765b32d38db85d2e1ce7d588a1f (patch) | |
| tree | 82611f1f3ad6be94a093189b9430ac5941f89e10 /compiler/rustc_driver/src | |
| parent | 6bdae9edd0cc099daa6038bca469dc09b6fc078a (diff) | |
| download | rust-d282aca273d9a765b32d38db85d2e1ce7d588a1f.tar.gz rust-d282aca273d9a765b32d38db85d2e1ce7d588a1f.zip | |
driver: Only output ANSI if connected to a terminal
See #78435 for more.
Diffstat (limited to 'compiler/rustc_driver/src')
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 29771bee9ae..9b5b08bce61 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) |
