Fix processes silently ignoring the CWD when it does not exist, refs #9694
parent
4d2ae78703
commit
abcf9e993b
|
@ -38,6 +38,9 @@ class GitDriver extends VcsDriver
|
|||
{
|
||||
if (Filesystem::isLocalPath($this->url)) {
|
||||
$this->url = preg_replace('{[\\/]\.git/?$}', '', $this->url);
|
||||
if (!is_dir($this->url)) {
|
||||
throw new \RuntimeException('Failed to read package information from '.$this->url.' as the path does not exist');
|
||||
}
|
||||
$this->repoDir = $this->url;
|
||||
$cacheUrl = realpath($this->url);
|
||||
} else {
|
||||
|
|
|
@ -61,6 +61,10 @@ class ProcessExecutor
|
|||
$cwd = realpath(getcwd());
|
||||
}
|
||||
|
||||
if (null !== $cwd && !is_dir($cwd)) {
|
||||
throw new \RuntimeException('The given CWD for the process does not exist: '.$cwd);
|
||||
}
|
||||
|
||||
$this->captureOutput = func_num_args() > 1;
|
||||
$this->errorOutput = null;
|
||||
|
||||
|
|
Loading…
Reference in New Issue