From b77f9d9165080f1a00c545a0957beedca6cbb133 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Thu, 4 Sep 2025 22:05:09 +0200 Subject: [PATCH] up controller --- src/Controller/WikiController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Controller/WikiController.php b/src/Controller/WikiController.php index 8fc1fb1..59213b5 100644 --- a/src/Controller/WikiController.php +++ b/src/Controller/WikiController.php @@ -1161,7 +1161,8 @@ EOT; if (file_exists($scriptPath)) { // Execute the translation script with virtual environment - $command = 'cd ' . $this->getParameter('kernel.project_dir') . ' && source venv/bin/activate && python ' . $scriptPath . ' "' . $key . '"'; + $venvPython = $this->getParameter('kernel.project_dir') . '/venv/bin/python'; + $command = 'cd ' . $this->getParameter('kernel.project_dir') . ' && ' . $venvPython . ' ' . $scriptPath . ' "' . $key . '"'; $output = []; $returnVar = 0; exec($command, $output, $returnVar); @@ -1191,7 +1192,8 @@ EOT; if (file_exists($scriptPath)) { // Execute the translation script with the update flag and virtual environment - $command = 'cd ' . $this->getParameter('kernel.project_dir') . ' && source venv/bin/activate && python ' . $scriptPath . ' "' . $key . '"'; + $venvPython = $this->getParameter('kernel.project_dir') . '/venv/bin/python'; + $command = 'cd ' . $this->getParameter('kernel.project_dir') . ' && ' . $venvPython . ' ' . $scriptPath . ' "' . $key . '"'; $output = []; $returnVar = 0; exec($command, $output, $returnVar);