When the prompt abstraction got added in
bc05a8f ("add basic UI
plugin infrastructure") it also inlined the check for the answer, as
that can be differently structured for each user interface, and
returns bool. But when switching over to this new infra, two sites
weren't updated to the simpler bool check and still checked with the
previous "equals 'ok'", which now was always false.
Fixes: 72bea99 ("switch prompt, error and message calls to new UI infra")
Reported-by: Alexander Zeidler <a.zeidler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
}
$message .= "or cancel the installation?";
- my $response = Proxmox::UI::prompt($message);
+ my $response_ok = Proxmox::UI::prompt($message);
- if ($response eq 'ok') {
+ if ($response_ok) {
for my $vg_uuid (keys %$duplicate_vgs) {
my $vg = $duplicate_vgs->{$vg_uuid};
my $new_vgname = $vg->{new_vgname};
die "root disk '$target_dev' too small (${hdgb} GB < $hard_limit GB)\n" if $hdgb < $hard_limit;
if ($hdgb < $soft_limit) {
- my $response = Proxmox::UI::prompt(
+ my $response_ok = Proxmox::UI::prompt(
"Root disk space ${hdgb} GB is below recommended minimum space of $soft_limit GB,"
." installation might not be successful! Continue?"
);
die "root disk '$target_dev' too small (${hdgb} GB < $soft_limit GB), and warning not accepted.\n"
- if $response ne 'ok';
+ if $response_ok;
}
syscmd("sgdisk -Z ${target_dev}");