Skip to content

Commit 408f3cc

Browse files
committed
Return no on any question input other than yes
Fixes #678
1 parent 4d2699a commit 408f3cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/util.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ pub fn ask(config: &Config, question: &str, default: bool) -> bool {
131131

132132
if input == tr!("y") || input == tr!("yes") {
133133
true
134-
} else if input == tr!("n") || input == tr!("no") {
135-
false
136-
} else {
134+
} else if input.trim().is_empty() {
137135
default
136+
} else {
137+
false
138138
}
139139
}
140140

0 commit comments

Comments
 (0)