mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
Add a return message for app updates trough occ
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Handle single and all apps Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Rewrite logic Fix psalm Fix psalm Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
parent
7cf3172f1c
commit
6dfe3c91d5
1 changed files with 10 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ class Update extends Command {
|
|||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int {
|
||||
$singleAppId = $input->getArgument('app-id');
|
||||
$updateFound = false;
|
||||
|
||||
if ($singleAppId) {
|
||||
$apps = [$singleAppId];
|
||||
|
|
@ -97,6 +98,7 @@ class Update extends Command {
|
|||
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')) {
|
||||
|
|
@ -122,6 +124,14 @@ class Update extends Command {
|
|||
}
|
||||
}
|
||||
|
||||
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…
Reference in a new issue