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:
1 parent
1053943073
commit
c6ab2904cd
3 files changed
+2
-24
No files matched your search
Generated
-21
@@ -613,17 +613,6 @@ version = "1.1.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
||||||
|
|
||||||
[[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]]
|
[[package]]
|
||||||
name = "auth-git2"
|
name = "auth-git2"
|
||||||
version = "0.5.4"
|
version = "0.5.4"
|
||||||
@@ -2443,7 +2432,6 @@ dependencies = [
|
|||||||
"ansi-to-html",
|
"ansi-to-html",
|
||||||
"ansi-to-tui",
|
"ansi-to-tui",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"atty",
|
|
||||||
"axum 0.7.5",
|
"axum 0.7.5",
|
||||||
"axum-extra",
|
"axum-extra",
|
||||||
"axum-server",
|
"axum-server",
|
||||||
@@ -4934,15 +4922,6 @@ version = "0.5.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
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]]
|
[[package]]
|
||||||
name = "hermit-abi"
|
name = "hermit-abi"
|
||||||
version = "0.3.9"
|
version = "0.3.9"
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ html_parser = { workspace = true }
|
|||||||
cargo_metadata = "0.18.1"
|
cargo_metadata = "0.18.1"
|
||||||
tokio = { version = "1.16.1", features = ["fs", "sync", "rt", "macros", "process", "rt-multi-thread"] }
|
tokio = { version = "1.16.1", features = ["fs", "sync", "rt", "macros", "process", "rt-multi-thread"] }
|
||||||
tokio-stream = "0.1.15"
|
tokio-stream = "0.1.15"
|
||||||
atty = "0.2.14"
|
|
||||||
chrono = "0.4.19"
|
chrono = "0.4.19"
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
hyper = { workspace = true }
|
hyper = { workspace = true }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use std::process::exit;
|
use std::{io::IsTerminal as _, process::exit};
|
||||||
|
|
||||||
use dioxus_rsx::{BodyNode, CallBody, TemplateBody};
|
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 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.");
|
return custom_error!("No input file, source, or stdin to translate from.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user