diff --git a/Cargo.lock b/Cargo.lock index b29a2f460..9e43062cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -277,17 +277,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "0.1.8" @@ -1446,7 +1435,6 @@ name = "crucible-common" version = "0.0.1" dependencies = [ "anyhow", - "atty", "crucible-workspace-hack", "dropshot", "nix", @@ -3407,15 +3395,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -4201,7 +4180,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "windows-sys 0.52.0", ] @@ -5068,7 +5047,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] diff --git a/Cargo.toml b/Cargo.toml index ddcb6da21..a48e68e7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,6 @@ anyhow = "1" async-channel = "2.5.0" async-recursion = "1.1.1" async-trait = "0.1.89" -atty = "0.2.14" base64 = "0.22.1" bincode = "1.3" byte-unit = "5.2.0" diff --git a/common/Cargo.toml b/common/Cargo.toml index f9478a770..00c286b19 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -7,7 +7,6 @@ edition = "2024" [dependencies] anyhow.workspace = true -atty.workspace = true nix.workspace = true rustls-pemfile.workspace = true schemars.workspace = true diff --git a/common/src/lib.rs b/common/src/lib.rs index 9aa5f8edc..b7b0f3c9f 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -2,7 +2,7 @@ use std::fmt; use std::fs::File; use std::hash::Hasher; -use std::io::{ErrorKind, Read, Write}; +use std::io::{ErrorKind, IsTerminal, Read, Write}; use std::path::Path; use ErrorKind::NotFound; @@ -379,7 +379,7 @@ pub fn build_logger() -> slog::Logger { /// Build a logger with the specific log level pub fn build_logger_with_level(level: slog::Level) -> slog::Logger { - let main_drain = if atty::is(atty::Stream::Stdout) { + let main_drain = if std::io::stdout().is_terminal() { let decorator = slog_term::TermDecorator::new().build(); let drain = slog_term::FullFormat::new(decorator).build().fuse(); slog_async::Async::new(drain)