up controller

This commit is contained in:
Tykayn 2025-09-04 22:05:09 +02:00 committed by tykayn
parent 28ec8afa77
commit b77f9d9165

View file

@ -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);