Skip to content

Commit 167d0d1

Browse files
authored
Merge pull request #40538 from nextcloud/occAppUpdatesReturn
2 parents 59f3c73 + 6dfe3c9 commit 167d0d1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

core/Command/App/Update.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ protected function configure(): void {
7777

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

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

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

127+
if (!$updateFound) {
128+
if ($singleAppId) {
129+
$output->writeln($singleAppId . ' is up-to-date or no updates could be found');
130+
} else {
131+
$output->writeln('All apps are up-to-date or no updates could be found');
132+
}
133+
}
134+
125135
return $return;
126136
}
127137
}

0 commit comments

Comments
 (0)