diff options
Diffstat (limited to 'make')
-rw-r--r-- | make/console.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/make/console.pm b/make/console.pm index 0d3c1b38d..132544caa 100644 --- a/make/console.pm +++ b/make/console.pm @@ -92,8 +92,12 @@ sub print_warning { sub prompt_bool($$$) { my ($interactive, $question, $default) = @_; - my $answer = prompt_string($interactive, $question, $default ? 'y' : 'n'); - return $answer =~ /y/i; + while (1) { + my $answer = prompt_string($interactive, $question, $default ? 'yes' : 'no'); + return 1 if $answer =~ /^y(?:es)?$/i; + return 0 if $answer =~ /^no?$/i; + print_warning "\"$answer\" is not \"yes\" or \"no\". Please try again.\n"; + } } sub prompt_dir($$$;$) { |