From 8d69c49da595c60dae51c77d48f397ab97fdf318 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 20 May 2016 12:51:05 -0400 Subject: Manage plugins from the user interface and from the command line --- app/Console/PluginUninstallCommand.php | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 app/Console/PluginUninstallCommand.php (limited to 'app/Console/PluginUninstallCommand.php') diff --git a/app/Console/PluginUninstallCommand.php b/app/Console/PluginUninstallCommand.php new file mode 100644 index 00000000..c645e03f --- /dev/null +++ b/app/Console/PluginUninstallCommand.php @@ -0,0 +1,35 @@ +setName('plugin:uninstall') + ->setDescription('Remove a plugin') + ->addArgument('pluginId', InputArgument::REQUIRED, 'Plugin directory name'); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + if (!Installer::isConfigured()) { + $output->writeln('Kanboard is not configured to remove plugins itself'); + } + + try { + $installer = new Installer($this->container); + $installer->uninstall($input->getArgument('pluginId')); + $output->writeln('Plugin removed successfully'); + } catch (PluginInstallerException $e) { + $output->writeln(''.$e->getMessage().''); + } + } +} -- cgit v1.2.3