mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 15:16:37 +00:00
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:
parent
f71552526d
commit
266fac1339
1 changed files with 5 additions and 2 deletions
|
@ -34,8 +34,11 @@ pub async fn confirm() -> Result<(), BinstallError> {
|
|||
}
|
||||
|
||||
match input.as_str().trim() {
|
||||
"yes" | "y" | "YES" | "Y" => break true,
|
||||
_ => => break false,
|
||||
"" | "yes" | "y" | "YES" | "Y" => break false,
|
||||
"no" | "n" | "NO" | "N" => break true,
|
||||
_ => {
|
||||
input.clear();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue