Fix puppeteer EACCES: set TMPDIR to project tmp dir
All checks were successful
Deploy / deploy (push) Successful in 8s
All checks were successful
Deploy / deploy (push) Successful in 8s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
57f4af07e0
commit
6c82523cc8
1 changed files with 4 additions and 2 deletions
|
|
@ -52,7 +52,8 @@ class PdfGenerator
|
|||
$pdfFile = tempnam($this->config['tmp_dir'], 'pdf_') . '.pdf';
|
||||
|
||||
try {
|
||||
$cmd = escapeshellcmd($this->config['pagedjs_bin']);
|
||||
$cmd = 'TMPDIR=' . escapeshellarg($this->config['tmp_dir']) . ' ';
|
||||
$cmd .= escapeshellcmd($this->config['pagedjs_bin']);
|
||||
$cmd .= ' ' . escapeshellarg($url);
|
||||
$cmd .= ' -o ' . escapeshellarg($pdfFile);
|
||||
|
||||
|
|
@ -110,7 +111,8 @@ class PdfGenerator
|
|||
|
||||
private function buildCommand(string $htmlFile, string $pdfFile, array $options): string
|
||||
{
|
||||
$cmd = escapeshellcmd($this->config['pagedjs_bin']);
|
||||
$cmd = 'TMPDIR=' . escapeshellarg($this->config['tmp_dir']) . ' ';
|
||||
$cmd .= escapeshellcmd($this->config['pagedjs_bin']);
|
||||
$cmd .= ' ' . escapeshellarg($htmlFile);
|
||||
$cmd .= ' -o ' . escapeshellarg($pdfFile);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue