MDL-80667 task: preserve environment when running tasks from web.

For sites that rely on environment variables to set configuration,
ensure they are also present when executing task process.

Co-authored-by: Olivier Wenger <[email protected]>
This commit is contained in:
Paul Holden
2024-01-18 16:54:06 +00:00
co-authored by Olivier Wenger
parent 076379a485
commit 87617b8daa
+1 -1
View File
@@ -1536,7 +1536,7 @@ class manager {
2 => ['pipe', 'w'], // STDERR.
];
flush();
$process = proc_open($command, $descriptorspec, $pipes, realpath('./'), []);
$process = proc_open($command, $descriptorspec, $pipes, realpath('./'));
if (is_resource($process)) {
while ($s = fgets($pipes[1])) {
mtrace($s, '');