Fix loop and add missing options
parent
1d80720405
commit
116b822953
|
@ -279,7 +279,7 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
|
||||||
$retries = 3;
|
$retries = 3;
|
||||||
while ($retries--) {
|
while ($retries--) {
|
||||||
try {
|
try {
|
||||||
$json = new JsonFile($filename, new RemoteFilesystem($this->io));
|
$json = new JsonFile($filename, new RemoteFilesystem($this->io, $this->options));
|
||||||
$data = $json->read();
|
$data = $json->read();
|
||||||
$this->cache->write($cacheKey, json_encode($data));
|
$this->cache->write($cacheKey, json_encode($data));
|
||||||
|
|
||||||
|
@ -292,6 +292,8 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
|
||||||
}
|
}
|
||||||
$this->degradedMode = true;
|
$this->degradedMode = true;
|
||||||
$data = json_decode($contents, true);
|
$data = json_decode($contents, true);
|
||||||
|
|
||||||
|
break;
|
||||||
} elseif (!$retries) {
|
} elseif (!$retries) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue