Skip to content

Commit

Permalink
chore: remove unmaintained atty crate (flxzt#1178)
Browse files Browse the repository at this point in the history
* Remove unmaintained crate "atty"

* Fix lint
  • Loading branch information
RayJW authored Aug 16, 2024
1 parent 2e0d148 commit 1f32b97
Show file tree
Hide file tree
Showing 4 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ adw = { version = "0.6.0", package = "libadwaita", features = ["v1_5"] }
anyhow = "1.0"
approx = "0.5.1"
async-fs = "2.1"
atty = "0.2.14"
base64 = "0.22.1"
cairo-rs = { version = "0.19.4", features = ["v1_18", "png", "svg", "pdf"] }
chrono = "0.4.38"
Expand Down
1 change: 0 additions & 1 deletion crates/rnote-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ rnote-compose = { workspace = true, features = ["clap-derive"] }
rnote-engine = { workspace = true, features = ["cli"] }

anyhow = { workspace = true }
atty = { workspace = true }
clap = { workspace = true }
dialoguer = { workspace = true }
indicatif = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion crates/rnote-cli/src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use rnote_engine::engine::export::{
};
use rnote_engine::engine::EngineSnapshot;
use rnote_engine::{Engine, SelectionCollision};
use std::io::{self, IsTerminal};
use std::path::{Path, PathBuf};

#[allow(clippy::too_many_arguments)]
Expand Down Expand Up @@ -427,7 +428,7 @@ pub(crate) fn file_conflict_prompt_action(
if !output_file.exists() {
return Ok(None);
}
if atty::isnt(atty::Stream::Stdout) {
if !io::stdout().is_terminal() {
return Err(anyhow::anyhow!(
"File conflict for file \"{}\" detected and terminal is not interactive. Option \"--on-conflict\" needs to be supplied.", output_file.display()
));
Expand Down

0 comments on commit 1f32b97

Please sign in to comment.