Skip to content

Commit

Permalink
Merge pull request #40538 from nextcloud/occAppUpdatesReturn
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Feb 24, 2024
2 parents 59f3c73 + 6dfe3c9 commit 167d0d1
Showing 1 changed file with 10 additions and 0 deletions.
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;
}
}

0 comments on commit 167d0d1

Please sign in to comment.