summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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"],