properly cache when a branch in a certain revision does not contain a composer.json
this prevents requesting/trying to get the composer.json over and over again even if no commits happend Closes #7156pull/7158/merge
parent
89e138a593
commit
af3783b5f4
|
@ -133,7 +133,16 @@ class SvnDriver extends VcsDriver
|
||||||
return $this->infoCache[$identifier] = JsonFile::parseJson($res);
|
return $this->infoCache[$identifier] = JsonFile::parseJson($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
$composer = $this->getBaseComposerInformation($identifier);
|
$composer = $this->getBaseComposerInformation($identifier);
|
||||||
|
} catch(TransportException $e) {
|
||||||
|
$message = $e->getMessage();
|
||||||
|
if (stripos($message, 'path not found') === false && stripos($message, 'svn: warning: W160013') === false) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
// remember a not-existent composer.json
|
||||||
|
$composer = '';
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->shouldCache($identifier)) {
|
if ($this->shouldCache($identifier)) {
|
||||||
$this->cache->write($identifier.'.json', json_encode($composer));
|
$this->cache->write($identifier.'.json', json_encode($composer));
|
||||||
|
|
Loading…
Reference in New Issue