From 55a2ae38019a08876a2ef89a32a9b2efa37e0a87 Mon Sep 17 00:00:00 2001 From: Gamerboy59 Date: Sat, 16 Dec 2023 20:13:58 +0100 Subject: [PATCH] Add manual_config install var to cli (#1208) Make the manual_config var, which is available to the web installer, usuable for the cli installer too. If manual_config is set to true skip else (not set or false) proceed with auto config. --- lib/Froxlor/Cli/InstallCommand.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Froxlor/Cli/InstallCommand.php b/lib/Froxlor/Cli/InstallCommand.php index cf00b6ba98..443c93cc69 100644 --- a/lib/Froxlor/Cli/InstallCommand.php +++ b/lib/Froxlor/Cli/InstallCommand.php @@ -273,8 +273,10 @@ private function showStep(int $step = 0, bool $extended = false, array $decoded_ $cmdfield['label'], $cmdfield['value'] ]); - if (!empty($decoded_input) || $this->io->confirm('Execute command now?', false)) { - passthru($cmdfield['value']); + if (!isset($decoded_input['manual_config']) || (bool)$decoded_input['manual_config'] === false) { + if (!empty($decoded_input) || $this->io->confirm('Execute command now?', false)) { + passthru($cmdfield['value']); + } } break; } @@ -305,7 +307,7 @@ private function printExampleFile(OutputInterface $output) $json_output = []; foreach ($fields['install']['sections'] as $section => $section_fields) { foreach ($section_fields['fields'] as $name => $field) { - if ($name == 'system' || $name == 'manual_config' || $name == 'target_servername') { + if ($name == 'system' || $name == 'target_servername') { continue; } if ($field['type'] == 'text' || $field['type'] == 'email') {