mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-29474 add env and plugin test to cli db install
This commit is contained in:
parent
f433088d5a
commit
72081a6f75
@ -144,6 +144,26 @@ if ($CFG->lang !== 'en') {
|
||||
$CFG->early_install_lang = false;
|
||||
get_string_manager(true);
|
||||
|
||||
require("$CFG->dirroot/version.php");
|
||||
|
||||
// Test environment first.
|
||||
require_once($CFG->libdir . '/environmentlib.php');
|
||||
list($envstatus, $environment_results) = check_moodle_environment(normalize_version($release), ENV_SELECT_RELEASE);
|
||||
if (!$envstatus) {
|
||||
$errors = environment_get_errors($environment_results);
|
||||
cli_heading(get_string('environment', 'admin'));
|
||||
foreach ($errors as $error) {
|
||||
list($info, $report) = $error;
|
||||
echo "!! $info !!\n$report\n\n";
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Test plugin dependencies.
|
||||
require_once($CFG->libdir . '/pluginlib.php');
|
||||
if (!plugin_manager::instance()->all_plugins_ok($version)) {
|
||||
cli_error(get_string('pluginschecktodo', 'admin'));
|
||||
}
|
||||
|
||||
install_cli_database($options, true);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user