Fix lock file being parsed when not strictly needed, fixes #9452
parent
b8e40f6060
commit
00dfd2c8e1
|
@ -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…
Reference in New Issue