1
0
mirror of https://github.com/danog/parallel.git synced 2024-11-27 04:44:56 +01:00

Better Windows support

This commit is contained in:
Aaron Piotrowski 2015-09-28 21:03:55 -05:00
parent cf1455b239
commit 1cf7dd62b9
2 changed files with 5 additions and 3 deletions

View File

@ -8,8 +8,8 @@ ob_start(function ($data) {
}, 1, 0);
$paths = [
dirname(dirname(dirname(__DIR__))) . '/autoload.php',
dirname(__DIR__) . '/vendor/autoload.php',
dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR . 'autoload.php',
dirname(__DIR__) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php',
];
$autoloadPath = null;

View File

@ -148,7 +148,9 @@ class Process
['pipe', 'w'], // exit code pipe
];
$command = sprintf('(%s) 3>/dev/null; code=$?; echo $code >&3; exit $code', $this->command);
$nd = 0 === strncasecmp(PHP_OS, 'WIN', 3) ? 'NUL' : '/dev/null';
$command = sprintf('(%s) 3>%s; code=$?; echo $code >&3; exit $code', $this->command, $nd);
$this->process = proc_open($command, $fd, $pipes, $this->cwd ?: null, $this->env ?: null, $this->options);