1
0
Fork 0

Clear stat cache after a git failure as it might have modified the filesystem

pull/4012/head
Jordi Boggiano 2015-05-07 16:27:06 +01:00
parent 9df08ec82f
commit 4d5d524704
1 changed files with 3 additions and 0 deletions

View File

@ -214,6 +214,9 @@ class Git
private function throwException($message, $url)
{
// git might delete a directory when it fails and php will not know
clearstatcache();
if (0 !== $this->process->execute('git --version', $ignoredOutput)) {
throw new \RuntimeException('Failed to clone '.self::sanitizeUrl($url).', git was not found, check that it is installed and in your PATH env.' . "\n\n" . $this->process->getErrorOutput());
}