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:
co-authored by
Olivier Wenger
parent
076379a485
commit
87617b8daa
@@ -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, '');
|
||||
|
||||
Reference in New Issue
Block a user