From 314955a64de3cdc5bc5808ec82e7af3c36a82360 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 18 Dec 2024 15:52:23 +0100 Subject: [PATCH] fix: improve wording of occ:upgrade command when no upgrade is required Signed-off-by: Robin Appelman --- core/Command/Upgrade.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index a9ed4cf2fd1be..6220c9a70d4c3 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -20,6 +20,7 @@ use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; +use OCP\IURLGenerator; use OCP\Util; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; @@ -36,6 +37,7 @@ class Upgrade extends Command { public function __construct( private IConfig $config, + private IURLGenerator $urlGenerator, ) { parent::__construct(); } @@ -205,7 +207,11 @@ function ($success) use ($output, $self) { . 'config.php and call this script again.', true); return self::ERROR_MAINTENANCE_MODE; } else { - $output->writeln('Nextcloud is already latest version'); + $output->writeln('No upgrade required.'); + $output->writeln(''); + $output->writeln('Note: This command triggers the upgrade actions associated with a new version. The new version\'s updated source files must be deployed in advance.'); + $doc = $this->urlGenerator->linkToDocs('admin-update'); + $output->writeln('See the upgrade documentation: ' . $doc . ' for more information.'); return self::ERROR_UP_TO_DATE; } }