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