Skip to content

Commit

Permalink
Add manual_config install var to cli (#1208)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Gamerboy59 authored Dec 16, 2023
1 parent a3b0332 commit 55a2ae3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Froxlor/Cli/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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') {
Expand Down

0 comments on commit 55a2ae3

Please sign in to comment.