diff --git a/Cargo.lock b/Cargo.lock index 8e3ca55f4..8df884914 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -592,7 +592,6 @@ name = "fnm" version = "1.33.1" dependencies = [ "anyhow", - "atty", "chrono", "clap", "clap_complete", diff --git a/Cargo.toml b/Cargo.toml index ee3921253..e44145002 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ tempfile = "3.6.0" indoc = "2.0.1" log = "0.4.19" env_logger = "0.10.0" -atty = "0.2.14" encoding_rs_io = "0.1.7" reqwest = { version = "0.11.18", features = ["blocking", "json", "rustls-tls", "rustls-tls-native-roots", "brotli"], default-features = false } url = "2.4.0" diff --git a/src/commands/use.rs b/src/commands/use.rs index 3807d6794..14bbfb4b9 100644 --- a/src/commands/use.rs +++ b/src/commands/use.rs @@ -159,9 +159,9 @@ fn replace_symlink(from: &std::path::Path, to: &std::path::Path) -> std::io::Res } fn should_install_interactively(requested_version: &UserVersion) -> bool { - use std::io::Write; + use std::io::{IsTerminal, Write}; - if !(atty::is(atty::Stream::Stdout) && atty::is(atty::Stream::Stdin)) { + if !(std::io::stdout().is_terminal() && std::io::stdin().is_terminal()) { return false; }