X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Fconsole.pm;h=132544caafe8b00d39b1ec3062eca25b11e72c41;hb=9982ec4e5b027ed24b1fda5e6fd3ab35b98de1a7;hp=0d3c1b38d6f962fe96dda066346cb2ecdda5a1a3;hpb=c0aba5b728b0a921d95ec120aa638dab1520b42f;p=user%2Fhenk%2Fcode%2Finspircd.git 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($$$;$) {