Skip to content

Commit

Permalink
Return no on any question input other than yes
Browse files Browse the repository at this point in the history
Fixes #678
  • Loading branch information
Morganamilo committed Feb 15, 2022
1 parent 4d2699a commit 408f3cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ pub fn ask(config: &Config, question: &str, default: bool) -> bool {

if input == tr!("y") || input == tr!("yes") {
true
} else if input == tr!("n") || input == tr!("no") {
false
} else {
} else if input.trim().is_empty() {
default
} else {
false
}
}

Expand Down

0 comments on commit 408f3cc

Please sign in to comment.