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:
parent
cf1455b239
commit
1cf7dd62b9
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user