Fix : timeout ne comprend pas TMPDIR=… comme env var, utiliser env
All checks were successful
Deploy / deploy (push) Successful in 11s

Avec `timeout 360 TMPDIR=… pagedjs-cli`, timeout interprète TMPDIR=… comme
le nom de la commande et échoue avec 'No such file or directory'. Préfixer
avec `env` règle le problème.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-05-04 10:54:24 +02:00
parent 8c8c0b0b91
commit f91be3b8c7

View file

@ -92,7 +92,7 @@ class PdfGenerator
$maxDuration = $this->config['job_max_duration'] ?? 360;
$cmd = 'timeout ' . (int)$maxDuration . ' ';
$cmd .= 'TMPDIR=' . escapeshellarg($this->config['tmp_dir']) . ' ';
$cmd .= 'env TMPDIR=' . escapeshellarg($this->config['tmp_dir']) . ' ';
$cmd .= escapeshellcmd($this->config['pagedjs_bin']);
$cmd .= ' ' . escapeshellarg($url);
$cmd .= ' -o ' . escapeshellarg($pdfFile);