Windows support

This commit is contained in:
Daniil Gentili 2020-09-24 11:58:00 +02:00
parent bc13e61526
commit 7a550311ac
1 changed files with 7 additions and 1 deletions

View File

@ -38,8 +38,14 @@ final class ProcessRunner extends RunnerAbstract
$runner = self::getScriptPath();
if (\strtolower(\substr(PHP_OS, 0, 3)) === 'win') {
$binary = \str_replace("Program Files", "PROGRA~1", $binary);
// Pray there are no spaces in the name, escapeshellarg would help but windows doesn't want quotes in the program name
} else {
$binary = \escapeshellarg($binary);
}
$command = \implode(" ", [
\escapeshellarg($binary),
$binary,
self::formatOptions($options),
$runner,
'madeline-ipc',