summaryrefslogtreecommitdiffstats
path: root/urpm/msg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/msg.pm')
-rw-r--r--urpm/msg.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/urpm/msg.pm b/urpm/msg.pm
index 308deda3..8c681fa9 100644
--- a/urpm/msg.pm
+++ b/urpm/msg.pm
@@ -70,10 +70,12 @@ sub message_input {
}
$input = <STDIN>;
defined $input or return undef;
+ chomp $input;
$urpm::args::options{bug} and log_it($input);
if ($opts{boolean}) {
- $input =~ /^[$noexpr$yesexpr]*$/ and last;
+ $input =~ /^[$noexpr$yesexpr]?$/ and last;
} elsif ($opts{range}) {
+ $input eq "" and $input = 1; #- defaults to first choice
(defined $opts{range_min} ? $opts{range_min} : 1) <= $input && $input <= $opts{range} and last;
} else {
last;