Skip to content

Commit

Permalink
Quotes all arguments used by MagentoCoreProxyCommand (netz98#1406)
Browse files Browse the repository at this point in the history
The PHP binary path can contain spaces which cause issues.
  • Loading branch information
cmuench committed Feb 11, 2024
1 parent d0bdf43 commit 988e87b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/N98/Magento/Command/MagentoCoreProxyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
);
}

$shellCommand = escapeshellarg(OperatingSystem::getPhpBinary())
. ' '
. escapeshellarg($this->magentoRootDir . '/bin/magento')
. ' '
. $magentoCoreCommandInput->__toString();
$process = Process::fromShellCommandline(
OperatingSystem::getPhpBinary() . ' ' . $this->magentoRootDir . '/bin/magento ' . $magentoCoreCommandInput->__toString(),
$shellCommand,
$this->magentoRootDir,
$envVariablesForBinMagento
);
Expand Down

0 comments on commit 988e87b

Please sign in to comment.