Skip to content

Commit

Permalink
Replace unmaintained atty crate with is-terminal (#259, #260)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Charytoniuk <[email protected]>
  • Loading branch information
tyranron and achary authored Feb 24, 2023
1 parent 9152e60 commit 7668333
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ timestamps = []

[dependencies]
async-trait = "0.1.43"
atty = "0.2.14"
clap = { version = "4.0.6", features = ["derive", "wrap_help"] }
clap = { version = "4.0.27", features = ["derive", "wrap_help"] }
console = "0.15"
derive_more = { version = "0.99.17", features = ["as_ref", "deref", "deref_mut", "display", "error", "from", "into"], default_features = false }
drain_filter_polyfill = "0.1.2"
Expand All @@ -50,6 +49,7 @@ futures = "0.3.17"
gherkin = "0.13"
globwalk = "0.8.1"
humantime = "2.1"
is-terminal = "0.4.4"
itertools = "0.10"
linked-hash-map = "0.5.3"
once_cell = "1.13"
Expand Down
4 changes: 2 additions & 2 deletions src/writer/out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use std::{borrow::Cow, io, mem, str};

use console::Style;
use derive_more::{Deref, DerefMut, Display, From, Into};
use is_terminal::IsTerminal;

use super::Coloring;

Expand Down Expand Up @@ -53,8 +54,7 @@ impl Default for Styles {
retry: Style::new().magenta(),
header: Style::new().blue(),
bold: Style::new().bold(),
is_present: atty::is(atty::Stream::Stdout)
&& console::colors_enabled(),
is_present: io::stdout().is_terminal() && console::colors_enabled(),
}
}
}
Expand Down

0 comments on commit 7668333

Please sign in to comment.