Skip to content

Commit

Permalink
Fix auto config cmd display on manual_config
Browse files Browse the repository at this point in the history
Only display command for automatic install if no manual_config was specified.
  • Loading branch information
Gamerboy59 authored Dec 17, 2023
1 parent 43eff78 commit ad51b69
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/Froxlor/Cli/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@ private function showStep(int $step = 0, bool $extended = false, array $decoded_
return $this->showStep(++$step, $extended, $decoded_input);
break;
case 4:
$section = $inst->formfield['install']['sections']['step' . $step] ?? [];
$this->io->section($section['title']);
$this->io->note($this->cliTextFormat($section['description']));
$cmdfield = $section['fields']['system'];
$this->io->success([
$cmdfield['label'],
$cmdfield['value']
]);
if (!isset($decoded_input['manual_config']) || (bool)$decoded_input['manual_config'] === false) {
$section = $inst->formfield['install']['sections']['step' . $step] ?? [];
$this->io->section($section['title']);
$this->io->note($this->cliTextFormat($section['description']));
$cmdfield = $section['fields']['system'];
$this->io->success([
$cmdfield['label'],
$cmdfield['value']
]);
if (!empty($decoded_input) || $this->io->confirm('Execute command now?', false)) {
passthru($cmdfield['value']);
}
Expand Down

0 comments on commit ad51b69

Please sign in to comment.