aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/App/Remove.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/App/Remove.php')
-rw-r--r--core/Command/App/Remove.php33
1 files changed, 6 insertions, 27 deletions
diff --git a/core/Command/App/Remove.php b/core/Command/App/Remove.php
index 388f5603fe7..d43bfa96ccc 100644
--- a/core/Command/App/Remove.php
+++ b/core/Command/App/Remove.php
@@ -3,29 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018, Patrik Kernstock <info@pkern.at>
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- * @author John Molakvoæ <skjnldsv@protonmail.com>
- * @author Patrik Kernstock <info@pkern.at>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\Core\Command\App;
@@ -70,9 +49,9 @@ class Remove extends Command implements CompletionAwareInterface {
protected function execute(InputInterface $input, OutputInterface $output): int {
$appId = $input->getArgument('app-id');
- // Check if the app is installed
- if (!$this->manager->isInstalled($appId)) {
- $output->writeln($appId . ' is not installed');
+ // Check if the app is enabled
+ if (!$this->manager->isEnabledForAnyone($appId)) {
+ $output->writeln($appId . ' is not enabled');
return 1;
}
@@ -138,7 +117,7 @@ class Remove extends Command implements CompletionAwareInterface {
*/
public function completeArgumentValues($argumentName, CompletionContext $context): array {
if ($argumentName === 'app-id') {
- return $this->manager->getInstalledApps();
+ return $this->manager->getEnabledApps();
}
return [];
}