From 52c0213d98a9f262c2dbfbc42eec4e5b96b3a37b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Tue, 31 May 2022 23:17:57 +1200 Subject: [PATCH] Show prompt for confirm --- src/helpers.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helpers.rs b/src/helpers.rs index 1f90ac69..6c412b6d 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -1,3 +1,4 @@ +use std::io::{stderr, stdin, Write}; use std::path::{Path, PathBuf}; use log::{debug, info}; @@ -194,9 +195,11 @@ pub fn get_install_path>(install_path: Option

) -> Option Result<(), BinstallError> { loop { info!("Do you wish to continue? yes/no"); + eprint!("? "); + stderr().flush().ok(); let mut input = String::new(); - std::io::stdin().read_line(&mut input).unwrap(); + stdin().read_line(&mut input).unwrap(); match input.as_str().trim() { "yes" | "y" | "YES" | "Y" => break Ok(()),