Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 179cd58

Browse files
committed
[Process] Fix regression introduced in #6620 / 880da01, fixes #7082
1 parent d41fc8b commit 179cd58

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ public function __construct($commandline, $cwd = null, array $env = null, $stdin
5454

5555
$this->commandline = $commandline;
5656
$this->cwd = $cwd;
57+
// on windows, if the cwd changed via chdir(), proc_open defaults to the dir where php was started
58+
if (null === $this->cwd && defined('PHP_WINDOWS_VERSION_BUILD')) {
59+
$this->cwd = getcwd();
60+
}
5761
if (null !== $env) {
5862
$this->env = array();
5963
foreach ($env as $key => $value) {

0 commit comments

Comments
 (0)