From 0a363910d6fd7a0bf9a1d496f3f0aa1540b0dd28 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Thu, 26 Jan 2023 15:21:38 +0100 Subject: [PATCH] fix potential infinite loop on errors in cli-installation; fixes #1092 Signed-off-by: Michael Kaufmann --- lib/Froxlor/Cli/InstallCommand.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Froxlor/Cli/InstallCommand.php b/lib/Froxlor/Cli/InstallCommand.php index 03e1a107..cd1f5484 100644 --- a/lib/Froxlor/Cli/InstallCommand.php +++ b/lib/Froxlor/Cli/InstallCommand.php @@ -246,7 +246,10 @@ final class InstallCommand extends Command } } catch (Exception $e) { $this->io->error($e->getMessage()); - return $this->showStep($step, $extended, $decoded_input); + if ($this->io->confirm('Retry?', empty($decoded_input))) { + return $this->showStep($step, $extended, $decoded_input); + } + return self::FAILURE; } if ($step == 3) { // do actual install with data from $this->formfielddata @@ -297,7 +300,7 @@ final class InstallCommand extends Command $json_output = []; foreach ($fields['install']['sections'] as $section => $section_fields) { foreach ($section_fields['fields'] as $name => $field) { - if ($name == 'system' || $name == 'manual_config') { + if ($name == 'system' || $name == 'manual_config' || $name == 'target_servername') { continue; } if ($field['type'] == 'text' || $field['type'] == 'email') {