public function __construct(Process $process)
{
$error = sprintf('PHP error message was detected when running this command:' . PHP_EOL . ' %s' . PHP_EOL . 'Moodle scripts should run without any PHP errors.', $process->getCommandLine());
if (!$process->isOutputDisabled()) {
$error .= sprintf("\n\nError Output\n============\n%s", $process->getErrorOutput());
}
parent::__construct($error);
}