-
-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add manual_config install var to cli #1208
Conversation
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.
Correction: the cliinstaller already creates the userdata.inc.php on step 3 - so i guess it's fine to skip the configuration |
I'm not quite sure if I understand your correction statement correctly. Is it fine to skip the config like in this PR or do you want it differently or is it already skipped? |
I was kind of thinking out loud sorry if it was a bit confusing. No, basically it's all fine, I would do it a bit differently, don't really like a ternary operator within an if-statement. Something like this: - if (!empty($decoded_input) || $this->io->confirm('Execute command now?', false)) {
- passthru($cmdfield['value']);
+ if (!empty($decoded_input) &&
+ (!isset($decoded_input['manual_config']) || (bool)$decoded_input['manual_config'] === false)
+ ) {
+ if ($this->io->confirm('Execute command now?', false)) {
+ passthru($cmdfield['value']);
+ }
} what do you think? |
We can do it without ternary but in your example the confirm dialog would always appear which is not good for fully unattended runs. The passthru cmd should be executed even if the |
Yes, you're right, this should do: 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']);
}
}
|
Yes thanks, this looks like a disassemblement of the ternary version. |
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.
Maybe example in docs needs to be updated, too.