Avoid requiring a lock file to run composer remove, fixes #9439
parent
4468248c46
commit
87006774b1
|
@ -253,13 +253,18 @@ EOT
|
|||
->setApcuAutoloader($apcu, $apcuPrefix)
|
||||
->setUpdate(true)
|
||||
->setInstall(!$input->getOption('no-install'))
|
||||
->setUpdateAllowList($packages)
|
||||
->setUpdateAllowTransitiveDependencies($updateAllowTransitiveDependencies)
|
||||
->setIgnorePlatformRequirements($ignorePlatformReqs)
|
||||
->setRunScripts(!$input->getOption('no-scripts'))
|
||||
->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();
|
||||
if ($status !== 0) {
|
||||
$io->writeError("\n".'<error>Removal failed, reverting '.$file.' to its original content.</error>');
|
||||
|
|
Loading…
Reference in New Issue