Skip to content

Commit

Permalink
Make sure a single letter is needed to exit the private stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
cr-fuel committed Oct 31, 2023
1 parent 5686e72 commit e7287e5
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions bin/keygen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ description = "Command line utilities for fuel-core key management"
anyhow = { workspace = true }
atty = "0.2.14"
clap = { workspace = true, features = ["derive", "env"] }
crossterm = "0.27.0"
fuel-core-keygen = { workspace = true }
serde_json = { workspace = true, features = ["raw_value"] }
termion = "2.0.1"
3 changes: 3 additions & 0 deletions bin/keygen/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! A simple keygen cli utility tool for configuring fuel-core
use atty::Stream;
use clap::Parser;
use crossterm::terminal;
use fuel_core_keygen::{
new_key,
parse_secret,
Expand Down Expand Up @@ -79,7 +80,9 @@ fn main() -> anyhow::Result<()> {

fn wait_for_keypress() {
let mut single_key = [0u8];
terminal::enable_raw_mode().expect("enable_raw_mode failed");
stdin().read_exact(&mut single_key).unwrap();
terminal::disable_raw_mode().expect("disable_raw_mode failed");
}

fn display_string_discreetly(
Expand Down

0 comments on commit e7287e5

Please sign in to comment.