mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2024-11-10 12:09:33 +01:00
Merge pull request 'print message before reading in readline
' (#92) from readline-fix into main
Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/92
This commit is contained in:
commit
4a9c9b7301
1 changed files with 2 additions and 1 deletions
|
@ -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)?;
|
||||
|
|
Loading…
Reference in a new issue