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.
This commit is contained in:
Gamerboy59
2023-12-16 20:13:58 +01:00
committed by GitHub
parent a3b0332d13
commit 55a2ae3801

View File

@@ -273,9 +273,11 @@ final class InstallCommand extends Command
$cmdfield['label'], $cmdfield['label'],
$cmdfield['value'] $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)) { if (!empty($decoded_input) || $this->io->confirm('Execute command now?', false)) {
passthru($cmdfield['value']); passthru($cmdfield['value']);
} }
}
break; break;
} }
return $result; return $result;
@@ -305,7 +307,7 @@ final class InstallCommand extends Command
$json_output = []; $json_output = [];
foreach ($fields['install']['sections'] as $section => $section_fields) { foreach ($fields['install']['sections'] as $section => $section_fields) {
foreach ($section_fields['fields'] as $name => $field) { foreach ($section_fields['fields'] as $name => $field) {
if ($name == 'system' || $name == 'manual_config' || $name == 'target_servername') { if ($name == 'system' || $name == 'target_servername') {
continue; continue;
} }
if ($field['type'] == 'text' || $field['type'] == 'email') { if ($field['type'] == 'text' || $field['type'] == 'email') {