Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a message for app updates trough occ when no updates available #40538

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions core/Command/App/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ protected function configure(): void {

protected function execute(InputInterface $input, OutputInterface $output): int {
$singleAppId = $input->getArgument('app-id');
$updateFound = false;

if ($singleAppId) {
$apps = [$singleAppId];
Expand All @@ -97,6 +98,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
foreach ($apps as $appId) {
$newVersion = $this->installer->isUpdateAvailable($appId, $input->getOption('allow-unstable'));
if ($newVersion) {
$updateFound = true;
$output->writeln($appId . ' new version available: ' . $newVersion);

if (!$input->getOption('showonly')) {
Expand All @@ -122,6 +124,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}
}

if (!$updateFound) {
if ($singleAppId) {
$output->writeln($singleAppId . ' is up-to-date or no updates could be found');
} else {
$output->writeln('All apps are up-to-date or no updates could be found');
}
}

return $return;
}
}
Loading