[Process] Added more detail to the exception when the CWD is invalid

This commit is contained in:
Grégoire Pineau 2019-04-01 15:29:45 +02:00
parent 9bcea2e9f4
commit d27858f77b
2 changed files with 3 additions and 2 deletions

View File

@ -331,7 +331,7 @@ class Process implements \IteratorAggregate
}
if (!is_dir($this->cwd)) {
throw new RuntimeException('The provided cwd does not exist.');
throw new RuntimeException(sprintf('The provided cwd "%s" does not exist.', $this->cwd));
}
$this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $options);

View File

@ -49,7 +49,8 @@ class ProcessTest extends TestCase
/**
* @expectedException \Symfony\Component\Process\Exception\RuntimeException
* @expectedExceptionMessage The provided cwd does not exist.
* @expectedExceptionMessage The provided cwd "
* @expectedExceptionMessage "does not exist.
*/
public function testInvalidCwd()
{