Make sure mirror update fails if no lock file is present
parent
2d025dce05
commit
e857a8216c
|
@ -367,12 +367,10 @@ class Installer
|
|||
// doing a full update
|
||||
}
|
||||
|
||||
if ($this->updateAllowList) {
|
||||
if (!$lockedRepository) {
|
||||
$this->io->writeError('<error>Cannot update only a partial set of packages without a lock file present.</error>', true, IOInterface::QUIET);
|
||||
if (($this->updateAllowList || $this->updateMirrors) && !$lockedRepository) {
|
||||
$this->io->writeError('<error>Cannot update ' . ($this->updateMirrors ? 'lock file information' : 'only a partial set of packages') . ' without a lock file present. Run `composer update` to generate a lock file.</error>', true, IOInterface::QUIET);
|
||||
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
$this->io->writeError('<info>Loading composer repositories with package information</info>');
|
||||
|
|
|
@ -31,7 +31,7 @@ Partial update without lock file should error
|
|||
--RUN--
|
||||
update b/unstable
|
||||
--EXPECT-OUTPUT--
|
||||
Cannot update only a partial set of packages without a lock file present.
|
||||
Cannot update only a partial set of packages without a lock file present. Run `composer update` to generate a lock file.
|
||||
--EXPECT-EXIT-CODE--
|
||||
1
|
||||
--EXPECT--
|
||||
|
|
Loading…
Reference in New Issue