summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/interactive.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 4b9079987..ea1945269 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -131,10 +131,13 @@ sub ask_from_listf_no_check {
my ($o, $title, $message, $f, $l, $def, $help) = @_;
if (@$l <= 2 && !$::isWizard) {
- ask_from_entries_refH_powered_no_check($o,
- { title => $title, messages => $message, ok => $l->[0] && may_apply($f, $l->[0]),
- if_($l->[1], cancel => may_apply($f, $l->[1]), focus_cancel => $def eq $l->[1]) }, []
- ) ? $l->[0] : $l->[1];
+ my $ret = eval {
+ ask_from_entries_refH_powered_no_check($o,
+ { title => $title, messages => $message, ok => $l->[0] && may_apply($f, $l->[0]),
+ if_($l->[1], cancel => may_apply($f, $l->[1]), focus_cancel => $def eq $l->[1]) }, []
+ ) ? $l->[0] : $l->[1];
+ };
+ $@ =~ /^wizcancel/ ? undef : $ret;
} else {
ask_from_entries_refH($o, $title, $message, [ { val => \$def, type => 'list', list => $l, help => $help, format => $f } ]) && $def;
}