Skip to content

Commit

Permalink
Merge pull request #54 from orhun/chore/remove_atty
Browse files Browse the repository at this point in the history
chore: remove unmaintainted atty dependency
  • Loading branch information
JakWai01 authored Sep 29, 2024
2 parents 486517c + ac72319 commit 15f814d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
25 changes: 2 additions & 23 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 @@ -37,7 +37,6 @@ riscv64 = []

[dependencies]
anyhow = "1"
atty = "0.2"
byteorder = "1"
clap = { version = "4", features = ["derive"] }
comfy-table = "7"
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::fs::OpenOptions;
use std::io::{BufWriter, Write};
use std::io::{self, BufWriter, IsTerminal, Write};

use anyhow::{bail, Context, Result};
use clap::{CommandFactory, Parser};
Expand Down Expand Up @@ -47,7 +47,7 @@ fn main() -> Result<()> {
.open(filepath)?,
))
} else {
style_config.use_colors = atty::is(atty::Stream::Stdout);
style_config.use_colors = io::stdout().is_terminal();
Box::new(std::io::stdout())
};

Expand Down

0 comments on commit 15f814d

Please sign in to comment.