Update ui.rs

Do not break on yes/y/YES/Y/"", break on no/n/NO/N, and keep asking otherwise

Signed-off-by: pepa65 <pepa65@passchier.net>
This commit is contained in:
pepa65 2024-10-30 19:24:38 +07:00 committed by GitHub
parent f71552526d
commit 266fac1339
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,8 +34,11 @@ pub async fn confirm() -> Result<(), BinstallError> {
} }
match input.as_str().trim() { match input.as_str().trim() {
"yes" | "y" | "YES" | "Y" => break true, "" | "yes" | "y" | "YES" | "Y" => break false,
_ => => break false, "no" | "n" | "NO" | "N" => break true,
_ => {
input.clear();
continue;
} }
} }
}; };