Only generate lock file when actually necessary, fixes #1064
parent
e0dc045955
commit
10d1a4382f
|
@ -198,6 +198,14 @@ class Locker
|
||||||
$lock['packages-dev'] = $this->lockPackages($devPackages);
|
$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()) {
|
if (!$this->isLocked() || $lock !== $this->getLockData()) {
|
||||||
$this->lockFile->write($lock);
|
$this->lockFile->write($lock);
|
||||||
$this->lockDataCache = null;
|
$this->lockDataCache = null;
|
||||||
|
|
Loading…
Reference in New Issue