diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 98f157d..dbc13fa 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -71,7 +71,7 @@ jobs: sudo chmod 640 \$DEPLOY_PATH/config/config.php echo 'Nettoyage...' - sudo rm -rf /tmp/web2print-deploy + rm -rf /tmp/web2print-deploy echo 'Deploiement termine avec succes!' " diff --git a/src/Services/PdfGenerator.php b/src/Services/PdfGenerator.php index 6e91688..fce4d32 100644 --- a/src/Services/PdfGenerator.php +++ b/src/Services/PdfGenerator.php @@ -52,8 +52,7 @@ class PdfGenerator $pdfFile = tempnam($this->config['tmp_dir'], 'pdf_') . '.pdf'; try { - $cmd = 'TMPDIR=' . escapeshellarg($this->config['tmp_dir']) . ' '; - $cmd .= escapeshellcmd($this->config['pagedjs_bin']); + $cmd = escapeshellcmd($this->config['pagedjs_bin']); $cmd .= ' ' . escapeshellarg($url); $cmd .= ' -o ' . escapeshellarg($pdfFile); @@ -111,8 +110,7 @@ class PdfGenerator private function buildCommand(string $htmlFile, string $pdfFile, array $options): string { - $cmd = 'TMPDIR=' . escapeshellarg($this->config['tmp_dir']) . ' '; - $cmd .= escapeshellcmd($this->config['pagedjs_bin']); + $cmd = escapeshellcmd($this->config['pagedjs_bin']); $cmd .= ' ' . escapeshellarg($htmlFile); $cmd .= ' -o ' . escapeshellarg($pdfFile);