1
0
Fork 0

Fix output inconsistencies when aliases are being used and '0 installs, 0 updates 0 removals' was being shown when any alias was present compared to 'Nothing to install, update or remove' when no alias is being used. (#11159)

pull/11161/head
PrinsFrank 2022-10-28 09:11:55 +02:00 committed by GitHub
parent bc29ffa500
commit 0430722e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 14 deletions

View File

@ -751,11 +751,6 @@ class Installer
$localRepoTransaction = new LocalRepoTransaction($lockedRepository, $localRepo);
$this->eventDispatcher->dispatchInstallerEvent(InstallerEvents::PRE_OPERATIONS_EXEC, $this->devMode, $this->executeOperations, $localRepoTransaction);
if (!$localRepoTransaction->getOperations()) {
$this->io->writeError('Nothing to install, update or remove');
}
if ($localRepoTransaction->getOperations()) {
$installs = $updates = $uninstalls = [];
foreach ($localRepoTransaction->getOperations() as $operation) {
if ($operation instanceof InstallOperation) {
@ -767,6 +762,9 @@ class Installer
}
}
if ($installs === [] && $updates === [] && $uninstalls === []) {
$this->io->writeError('Nothing to install, update or remove');
} else {
$this->io->writeError(sprintf(
"<info>Package operations: %d install%s, %d update%s, %d removal%s</info>",
count($installs),