fix: print message before reading in readline

This commit is contained in:
Cyborus 2024-07-13 23:04:04 -04:00
parent 23a345f5b3
commit 45ad1d81b9
No known key found for this signature in database

View file

@ -136,8 +136,9 @@ async fn update_msg(check: bool) -> eyre::Result<()> {
}
async fn readline(msg: &str) -> eyre::Result<String> {
use std::io::Write;
print!("{msg}");
tokio::io::stdout().flush().await?;
std::io::stdout().flush()?;
tokio::task::spawn_blocking(|| {
let mut input = String::new();
std::io::stdin().read_line(&mut input)?;