Skip to content
Snippets Groups Projects
Unverified Commit a64681a0 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #19514 from sndrr/already-enabled-apps

Already enabled apps
parents 9b7e24a7 6b62bef9
No related branches found
No related tags found
No related merge requests found
...@@ -105,6 +105,10 @@ class Enable extends Command implements CompletionAwareInterface { ...@@ -105,6 +105,10 @@ class Enable extends Command implements CompletionAwareInterface {
return $group->getDisplayName(); return $group->getDisplayName();
}, $groupIds); }, $groupIds);
if ($this->appManager->isInstalled($appId) && $groupIds === []) {
$output->writeln($appId . ' already enabled');
return;
}
try { try {
/** @var Installer $installer */ /** @var Installer $installer */
......
...@@ -75,6 +75,7 @@ class AppsEnableTest extends TestCase { ...@@ -75,6 +75,7 @@ class AppsEnableTest extends TestCase {
$data = [ $data = [
[['admin_audit'], null, 0, 'admin_audit enabled'], [['admin_audit'], null, 0, 'admin_audit enabled'],
[['comments'], null, 0, 'comments 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'], [['invalid_app'], null, 1, 'Could not download app invalid_app'],
[['admin_audit', 'comments'], null, 0, "admin_audit enabled\ncomments enabled"], [['admin_audit', 'comments'], null, 0, "admin_audit enabled\ncomments enabled"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment