Skip to content

Commit

Permalink
Remove dependency on atty
Browse files Browse the repository at this point in the history
It is no longer maintained and has been replaced by functionality in the
stdlib (std::io::IsTerminal).
  • Loading branch information
tpoliaw committed Oct 10, 2024
1 parent 1053943 commit 809f091
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
21 changes: 0 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/cli/translate.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::process::exit;
use std::{io::IsTerminal as _, process::exit};

use dioxus_rsx::{BodyNode, CallBody, TemplateBody};

Expand Down Expand Up @@ -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.");
}

Expand Down

0 comments on commit 809f091

Please sign in to comment.