diff --git a/Cargo.toml b/Cargo.toml index 8feac1d9..cb7a9dad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ serde = "1.0" serde_json = "1.0" serde_derive = "1.0" ciborium = "0.2.0" -atty = "0.2.6" +is-terminal = "0.4.6" clap = { version = "3.1", default-features = false, features = ["std"] } walkdir = "2.3" tinytemplate = "1.1" diff --git a/src/lib.rs b/src/lib.rs index 4bd772ca..b0c8e495 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -36,6 +36,7 @@ extern crate approx; #[cfg(test)] extern crate quickcheck; +use is_terminal::IsTerminal; use regex::Regex; #[cfg(feature = "real_blackbox")] @@ -76,6 +77,7 @@ use std::cell::RefCell; use std::collections::HashSet; use std::default::Default; use std::env; +use std::io::stdout; use std::net::TcpStream; use std::path::{Path, PathBuf}; use std::process::Command; @@ -1060,7 +1062,7 @@ https://bheisler.github.io/criterion.rs/book/faq.html } else { CliVerbosity::Normal }; - let stdout_isatty = atty::is(atty::Stream::Stdout); + let stdout_isatty = stdout().is_terminal(); let mut enable_text_overwrite = stdout_isatty && !verbose && !debug_enabled(); let enable_text_coloring; match matches.value_of("color") {