1
0
Fork 0

Fetch only non-dev packages from lock if doing a dev update fails due to a previously incomplete lock file, fixes #1650

pull/1654/head
Jordi Boggiano 2013-03-04 12:30:53 +01:00
parent 2db6fa1d50
commit 373ff04261
1 changed files with 6 additions and 1 deletions

View File

@ -377,7 +377,12 @@ class Installer
// to the version specified in the lock, or their currently installed version // to the version specified in the lock, or their currently installed version
if ($this->update && $this->updateWhitelist) { if ($this->update && $this->updateWhitelist) {
if ($this->locker->isLocked()) { if ($this->locker->isLocked()) {
$currentPackages = $this->locker->getLockedRepository($withDevReqs)->getPackages(); try {
$currentPackages = $this->locker->getLockedRepository($withDevReqs)->getPackages();
} catch (\RuntimeException $e) {
// fetch only non-dev packages from lock if doing a dev update fails due to a previously incomplete lock file
$currentPackages = $this->locker->getLockedRepository()->getPackages();
}
} else { } else {
$currentPackages = $installedRepo->getPackages(); $currentPackages = $installedRepo->getPackages();
} }