Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unmaintained atty. #2380

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion 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 bin/keygen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ path = "src/main.rs"

[dependencies]
anyhow = { workspace = true }
atty = "0.2.14"
clap = { workspace = true, features = ["derive", "env"] }
crossterm = "0.27.0"
fuel-core-keygen = { workspace = true }
Expand Down
8 changes: 2 additions & 6 deletions bin/keygen/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! A simple keygen cli utility tool for configuring fuel-core
use atty::Stream;
use clap::Parser;
use crossterm::terminal;
use fuel_core_keygen::{
Expand All @@ -8,10 +7,7 @@ use fuel_core_keygen::{
KeyType,
};
use std::io::{
stdin,
stdout,
Read,
Write,
stdin, stdout, IsTerminal, Read, Write
};
use termion::screen::IntoAlternateScreen;

Expand Down Expand Up @@ -88,7 +84,7 @@ fn display_string_discreetly(
discreet_string: &str,
continue_message: &str,
) -> anyhow::Result<()> {
if atty::is(Stream::Stdout) {
if stdout().is_terminal() {
let mut screen = stdout().into_alternate_screen()?;
writeln!(screen, "{discreet_string}")?;
screen.flush()?;
Expand Down
Loading