Avoid requiring a lock file to run composer remove, fixes #9439
parent
4468248c46
commit
87006774b1
|
@ -253,13 +253,18 @@ EOT
|
||||||
->setApcuAutoloader($apcu, $apcuPrefix)
|
->setApcuAutoloader($apcu, $apcuPrefix)
|
||||||
->setUpdate(true)
|
->setUpdate(true)
|
||||||
->setInstall(!$input->getOption('no-install'))
|
->setInstall(!$input->getOption('no-install'))
|
||||||
->setUpdateAllowList($packages)
|
|
||||||
->setUpdateAllowTransitiveDependencies($updateAllowTransitiveDependencies)
|
->setUpdateAllowTransitiveDependencies($updateAllowTransitiveDependencies)
|
||||||
->setIgnorePlatformRequirements($ignorePlatformReqs)
|
->setIgnorePlatformRequirements($ignorePlatformReqs)
|
||||||
->setRunScripts(!$input->getOption('no-scripts'))
|
->setRunScripts(!$input->getOption('no-scripts'))
|
||||||
->setDryRun($dryRun)
|
->setDryRun($dryRun)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
// if no lock is present, we do not do a partial update as
|
||||||
|
// this is not supported by the Installer
|
||||||
|
if ($composer->getLocker()->isLocked()) {
|
||||||
|
$install->setUpdateAllowList($packages);
|
||||||
|
}
|
||||||
|
|
||||||
$status = $install->run();
|
$status = $install->run();
|
||||||
if ($status !== 0) {
|
if ($status !== 0) {
|
||||||
$io->writeError("\n".'<error>Removal failed, reverting '.$file.' to its original content.</error>');
|
$io->writeError("\n".'<error>Removal failed, reverting '.$file.' to its original content.</error>');
|
||||||
|
|
Loading…
Reference in New Issue