Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Apr 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Symfony/Component/Process/Process.php
Expand Up @@ -331,7 +331,7 @@ public function start(callable $callback = null, array $env = [])
}

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);
Expand Down
3 changes: 2 additions & 1 deletion src/Symfony/Component/Process/Tests/ProcessTest.php
Expand Up @@ -49,7 +49,8 @@ protected function tearDown()

/**
* @expectedException \Symfony\Component\Process\Exception\RuntimeException
* @expectedExceptionMessage The provided cwd does not exist.
* @expectedExceptionMessage The provided cwd "
* @expectedExceptionMessage "does not exist.
*/
public function testInvalidCwd()
{
Expand Down