cli: flush credential verification prompts

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Icbca98ba56bc30e85d0f3972af616ca96a6a6964
This commit is contained in:
raf 2026-05-01 23:43:14 +03:00
commit 7ed425683d
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -1,4 +1,4 @@
use std::time::Duration;
use std::{io::Write, time::Duration};
use crate::{
error::{PakkerError, Result},
@ -56,6 +56,7 @@ pub async fn execute(
if let Some(ref key) = cf_key {
print!("Verifying CurseForge API key... ");
std::io::stdout().flush().ok();
match verify_curseforge(&client, key).await {
Ok(()) => {
println!("valid");
@ -76,6 +77,7 @@ pub async fn execute(
if let Some(ref token) = mr_token {
print!("Verifying Modrinth token... ");
std::io::stdout().flush().ok();
match verify_modrinth(&client, token).await {
Ok(()) => {
println!("valid");
@ -96,6 +98,7 @@ pub async fn execute(
if let Some(ref token) = gh_token {
print!("Verifying GitHub access token... ");
std::io::stdout().flush().ok();
match verify_github(&client, token).await {
Ok(()) => {
println!("valid");