Remove dependency on atty (#3047)

It is no longer maintained and has been replaced by functionality in the
stdlib (std::io::IsTerminal).
This commit is contained in:
Peter Holloway authored and GitHub committed 2024-10-10 13:24:50 +00:00
1 parent 1053943073
commit c6ab2904cd
3 files changed
+2 -24

No files matched your search

-1
View File
@@ -32,7 +32,6 @@ html_parser = { workspace = true }
cargo_metadata = "0.18.1"
tokio = { version = "1.16.1", features = ["fs", "sync", "rt", "macros", "process", "rt-multi-thread"] }
tokio-stream = "0.1.15"
atty = "0.2.14"
chrono = "0.4.19"
anyhow = "1"
hyper = { workspace = true }
+2 -2
View File
@@ -1,4 +1,4 @@
use std::process::exit;
use std::{io::IsTerminal as _, process::exit};
use dioxus_rsx::{BodyNode, CallBody, TemplateBody};
@@ -121,7 +121,7 @@ fn determine_input(file: Option<String>, raw: Option<String>) -> Result<String>
}
// If neither exist, we try to read from stdin
if atty::is(atty::Stream::Stdin) {
if std::io::stdin().is_terminal() {
return custom_error!("No input file, source, or stdin to translate from.");
}