Fix lock file being parsed when not strictly needed, fixes #9452

main
Jordi Boggiano 4 years ago
parent b8e40f6060
commit 00dfd2c8e1
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -360,8 +360,17 @@ class Installer
$lockedRepository = null;
if ($this->locker->isLocked()) {
$lockedRepository = $this->locker->getLockedRepository(true);
try {
if ($this->locker->isLocked()) {
$lockedRepository = $this->locker->getLockedRepository(true);
}
} catch (\Seld\JsonLint\ParsingException $e) {
if ($this->updateAllowList || $this->updateMirrors) {
// in case we are doing a partial update or updating mirrors, the lock file is needed so we error
throw $e;
}
// otherwise, ignoring parse errors as the lock file will be regenerated from scratch when
// doing a full update
}
if ($this->updateAllowList) {

Loading…
Cancel
Save