Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-04-27 12:00:16 +0300
committerGitHub <noreply@github.com>2020-04-27 12:00:16 +0300
commita64681a0fed38eb1652ddf3dd9aeeefb2a021f11 (patch)
tree9107dc4e399efb666817ee1358e8e722e4d166e9
parent9b7e24a7a1c1059c7f2a0568b2d5c29f512618f8 (diff)
parent6b62bef928cbe392f19e2bbaabff5b17d133e6a9 (diff)
Merge pull request #19514 from sndrr/already-enabled-apps
Already enabled apps
-rw-r--r--core/Command/App/Enable.php4
-rw-r--r--tests/Core/Command/Apps/AppsEnableTest.php1
2 files changed, 5 insertions, 0 deletions
diff --git a/core/Command/App/Enable.php b/core/Command/App/Enable.php
index c4e2363def5..d82a71d9eb4 100644
--- a/core/Command/App/Enable.php
+++ b/core/Command/App/Enable.php
@@ -105,6 +105,10 @@ class Enable extends Command implements CompletionAwareInterface {
return $group->getDisplayName();
}, $groupIds);
+ if ($this->appManager->isInstalled($appId) && $groupIds === []) {
+ $output->writeln($appId . ' already enabled');
+ return;
+ }
try {
/** @var Installer $installer */
diff --git a/tests/Core/Command/Apps/AppsEnableTest.php b/tests/Core/Command/Apps/AppsEnableTest.php
index a8aa4c434f0..b5d781aa125 100644
--- a/tests/Core/Command/Apps/AppsEnableTest.php
+++ b/tests/Core/Command/Apps/AppsEnableTest.php
@@ -75,6 +75,7 @@ class AppsEnableTest extends TestCase {
$data = [
[['admin_audit'], null, 0, 'admin_audit enabled'],
[['comments'], null, 0, 'comments enabled'],
+ [['comments', 'comments'], null, 0, "comments enabled\ncomments already enabled"],
[['invalid_app'], null, 1, 'Could not download app invalid_app'],
[['admin_audit', 'comments'], null, 0, "admin_audit enabled\ncomments enabled"],