Skip to content

Commit e46a86d

Browse files
committed
Use is_terminal
1 parent ccbcbb0 commit e46a86d

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ version = "0.2.0"
1717
# crates.io
1818
anyhow = { version = "1.0" }
1919
array-bytes = { version = "8.0" }
20-
atty = { version = "0.2" }
2120
blake2 = { version = "0.10" }
2221
chrono = { version = "0.4" }
2322
clap = { version = "4.5" }

lib/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ version.workspace = true
1111

1212
[dependencies]
1313
# crates.io
14-
atty = { workspace = true }
1514
blake2 = { workspace = true }
1615
frame-metadata = { workspace = true }
1716
md-5 = { workspace = true }

lib/src/docker.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
//! Polkadot Runtime Releaser Docker component.
22
33
// std
4-
use std::fmt::Display;
5-
// crates.io
6-
use atty::Stream;
4+
use std::{
5+
fmt::Display,
6+
io::{self, IsTerminal},
7+
};
78
// self
89
use crate::{
910
prelude::*,
@@ -57,7 +58,7 @@ impl<'a> RunArgs<'a> {
5758
}
5859
impl CliArgs for RunArgs<'_> {
5960
fn to_cli_args(&self) -> Vec<&str> {
60-
let maybe_it = if atty::is(Stream::Stdin) { "-it" } else { "-t" };
61+
let maybe_it = if io::stdin().is_terminal() { "-it" } else { "-t" };
6162
let mut args = vec!["run", maybe_it, "--rm"];
6263

6364
for env in &self.envs {

0 commit comments

Comments
 (0)