Skip to content

Commit a64681a

Browse files
authored
Merge pull request #19514 from sndrr/already-enabled-apps
Already enabled apps
2 parents 9b7e24a + 6b62bef commit a64681a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

core/Command/App/Enable.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ private function enableApp(string $appId, array $groupIds, bool $forceEnable, Ou
105105
return $group->getDisplayName();
106106
}, $groupIds);
107107

108+
if ($this->appManager->isInstalled($appId) && $groupIds === []) {
109+
$output->writeln($appId . ' already enabled');
110+
return;
111+
}
108112

109113
try {
110114
/** @var Installer $installer */

tests/Core/Command/Apps/AppsEnableTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function dataCommandInput(): array {
7575
$data = [
7676
[['admin_audit'], null, 0, 'admin_audit enabled'],
7777
[['comments'], null, 0, 'comments enabled'],
78+
[['comments', 'comments'], null, 0, "comments enabled\ncomments already enabled"],
7879
[['invalid_app'], null, 1, 'Could not download app invalid_app'],
7980

8081
[['admin_audit', 'comments'], null, 0, "admin_audit enabled\ncomments enabled"],

0 commit comments

Comments
 (0)