Fix: restore cd and stderr redirect for platform-images shell_exec
Got reverted during earlier merge conflict resolution. Without cd, node can't find modules. Without stderr redirect, log lines corrupt the JSON output causing json_decode to fail. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4c5d8b07dc
commit
6ec5f812e1
1 changed files with 1 additions and 1 deletions
|
|
@ -190,7 +190,7 @@ JSEOF;
|
||||||
file_put_contents($scriptPath, $script);
|
file_put_contents($scriptPath, $script);
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = shell_exec("PLAYWRIGHT_BROWSERS_PATH=/opt/playwright/browsers /usr/bin/node $scriptPath " . escapeshellarg($platformUrl) . " " . escapeshellarg($tempFile) . " 2>&1");
|
$output = shell_exec("cd /opt/playwright && PLAYWRIGHT_BROWSERS_PATH=/opt/playwright/browsers /usr/bin/node $scriptPath " . escapeshellarg($platformUrl) . " " . escapeshellarg($tempFile) . " 2>/tmp/platform-images-stderr.log");
|
||||||
@unlink($tempFile);
|
@unlink($tempFile);
|
||||||
|
|
||||||
$result = json_decode(trim($output ?? ''), true);
|
$result = json_decode(trim($output ?? ''), true);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue