[Process] Added more detail to the exception when the CWD is invalid
This commit is contained in:
parent
9bcea2e9f4
commit
d27858f77b
@ -331,7 +331,7 @@ class Process implements \IteratorAggregate
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!is_dir($this->cwd)) {
|
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);
|
$this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $options);
|
||||||
|
@ -49,7 +49,8 @@ class ProcessTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Symfony\Component\Process\Exception\RuntimeException
|
* @expectedException \Symfony\Component\Process\Exception\RuntimeException
|
||||||
* @expectedExceptionMessage The provided cwd does not exist.
|
* @expectedExceptionMessage The provided cwd "
|
||||||
|
* @expectedExceptionMessage "does not exist.
|
||||||
*/
|
*/
|
||||||
public function testInvalidCwd()
|
public function testInvalidCwd()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user