mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-43213 fix init regression and remove $checkphp parameter
This commit is contained in:
parent
a0e1168751
commit
9bb80d2005
6 changed files with 33 additions and 23 deletions
|
@ -100,10 +100,9 @@ class behat_command {
|
|||
* It checks behat dependencies have been installed and runs
|
||||
* the behat help command to ensure it works as expected
|
||||
*
|
||||
* @param bool $checkphp Extra check for the PHP version
|
||||
* @return int Error code or 0 if all ok
|
||||
*/
|
||||
public static function behat_setup_problem($checkphp = false) {
|
||||
public static function behat_setup_problem() {
|
||||
global $CFG;
|
||||
|
||||
$clibehaterrorstr = "Behat dependencies not installed. Ensure you ran the composer installer. " . self::DOCS_URL . "#Installation\n";
|
||||
|
|
|
@ -196,7 +196,7 @@ class behat_util extends testing_util {
|
|||
}
|
||||
|
||||
// Checks the behat set up and the PHP version.
|
||||
if ($errorcode = behat_command::behat_setup_problem(true)) {
|
||||
if ($errorcode = behat_command::behat_setup_problem()) {
|
||||
exit($errorcode);
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ class behat_util extends testing_util {
|
|||
}
|
||||
|
||||
// Checks the behat set up and the PHP version, returning an error code if something went wrong.
|
||||
if ($errorcode = behat_command::behat_setup_problem(true)) {
|
||||
if ($errorcode = behat_command::behat_setup_problem()) {
|
||||
return $errorcode;
|
||||
}
|
||||
|
||||
|
|
|
@ -211,6 +211,7 @@ function behat_check_config_vars() {
|
|||
}
|
||||
if (!file_exists($CFG->behat_dataroot)) {
|
||||
$permissions = isset($CFG->directorypermissions) ? $CFG->directorypermissions : 02777;
|
||||
umask(0);
|
||||
if (!mkdir($CFG->behat_dataroot, $permissions, true)) {
|
||||
behat_error(BEHAT_EXITCODE_PERMISSIONS, '$CFG->behat_dataroot directory can not be created');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue