Only generate lock file when actually necessary, fixes #1064

main
Jordi Boggiano 12 years ago
parent e0dc045955
commit 10d1a4382f

@ -198,6 +198,14 @@ class Locker
$lock['packages-dev'] = $this->lockPackages($devPackages);
}
if (empty($lock['packages']) && empty($lock['packages-dev'])) {
if ($this->lockFile->exists()) {
unlink($this->lockFile->getPath());
}
return false;
}
if (!$this->isLocked() || $lock !== $this->getLockData()) {
$this->lockFile->write($lock);
$this->lockDataCache = null;

Loading…
Cancel
Save