Fix require command crashing at the end if no lock file is present, fixes #11814
parent
bff129f4f5
commit
ef6c224ec2
|
@ -558,6 +558,7 @@ EOT
|
|||
throw new \RuntimeException('Unable to read '.$this->json->getPath().' contents to update the lock file hash.');
|
||||
}
|
||||
$lockFile = Factory::getLockFile($this->json->getPath());
|
||||
if (file_exists($lockFile)) {
|
||||
$lockMtime = filemtime($lockFile);
|
||||
$lock = new JsonFile($lockFile);
|
||||
$lockData = $lock->read();
|
||||
|
@ -568,6 +569,7 @@ EOT
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue