Skip to content

Commit

Permalink
Add a return message for app updates trough occ
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf authored Sep 20, 2023
1 parent 4ddbc55 commit 7c08617
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 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() {

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 @@ -121,6 +123,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}
}

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

return $return;
}
}

0 comments on commit 7c08617

Please sign in to comment.