Skip to content

Commit

Permalink
Fix issue with multiple php versions on YUNoHost (get php binary for …
Browse files Browse the repository at this point in the history
…async processes from env var ASYC_PHP_BINARY if it exists)
  • Loading branch information
Douze Bé committed Feb 20, 2024
1 parent e7c9313 commit c7ccc9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion includes/services/ConsoleService.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ public function __construct(Wiki $wiki, ParameterBagInterface $params)
*/
public function startConsoleAsync(string $command, array $args = [], string $subfolder = "", bool $newConsole = true, int $timeoutInSec = 60): ?Process
{
$phpBinaryPath = $this->phpBinaryFinder->find();
$phpBinaryPath = getenv('ASYNC_PHP_BINARY');
if(!$phpBinaryPath) {
$phpBinaryPath = $this->phpBinaryFinder->find();
}
$newCommand = $phpBinaryPath;
$newArgs = [self::CONSOLE_BIN,$command];
foreach ($args as $arg) {
Expand Down

0 comments on commit c7ccc9c

Please sign in to comment.