MDL-70643 admin: add summary argument to install database CLI.

Show warning for any unrecognised arguments.
This commit is contained in:
Paul Holden
2021-02-01 12:33:22 +00:00
parent fb9419ec0b
commit da9f213b3a
+7
View File
@@ -56,6 +56,7 @@ Options:
--agree-license Indicates agreement with software license.
--fullname=STRING Name of the site
--shortname=STRING Name of the site
--summary=STRING The summary to be displayed on the front page
-h, --help Print out this help
Example:
@@ -96,6 +97,7 @@ list($options, $unrecognized) = cli_get_params(
'adminemail' => '',
'fullname' => '',
'shortname' => '',
'summary' => '',
'agree-license' => false,
'help' => false
),
@@ -104,6 +106,11 @@ list($options, $unrecognized) = cli_get_params(
)
);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
// We show help text even if tables are installed.
if ($options['help']) {
echo $help;