From 179cd586466d7d31acd67be9e7c75d52488915f7 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 17 Feb 2013 20:36:23 +0100 Subject: [PATCH] [Process] Fix regression introduced in #6620 / 880da01c49a9255f5022ab7e18bca38c18f56370, fixes #7082 --- src/Symfony/Component/Process/Process.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index cf553ee11a..a506e0c33e 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -54,6 +54,10 @@ class Process $this->commandline = $commandline; $this->cwd = $cwd; + // on windows, if the cwd changed via chdir(), proc_open defaults to the dir where php was started + if (null === $this->cwd && defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->cwd = getcwd(); + } if (null !== $env) { $this->env = array(); foreach ($env as $key => $value) {