Skip to content

Commit

Permalink
Use specified PHP interpreter to load the Magento Command List (netz9…
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuench committed Apr 11, 2023
1 parent b339f80 commit 82cba5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/N98/Magento/Application/MagentoCoreCommandProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace N98\Magento\Application;

use N98\Magento\Command\MagentoCoreProxyCommandFactory;
use N98\Util\OperatingSystem;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;

Expand Down Expand Up @@ -80,7 +81,10 @@ public function getCommands(): array
private function load()
{
if (empty($this->commandData)) {
$process = new Process(['bin/magento', '--format=json'], $this->magentoRootDirectory);
$process = new Process(
[OperatingSystem::getPhpBinary(), 'bin/magento', '--format=json'],
$this->magentoRootDirectory
);
$process->run();
if (!$process->isSuccessful()) {
throw new ProcessFailedException($process);
Expand Down

0 comments on commit 82cba5a

Please sign in to comment.