summaryrefslogtreecommitdiff
path: root/app/Console
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-29 20:33:48 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-29 20:33:48 -0400
commitfb642b76bb3d84b38c09f5d9dff8b51369eedaf2 (patch)
tree29331a2df63d259811e8dc70065ef8507998c1fe /app/Console
parentb69eb5f99350a378387ab1f711d4fbe3bb3bddab (diff)
Make console commands pluggable
Diffstat (limited to 'app/Console')
-rw-r--r--app/Console/PluginInstallCommand.php3
-rw-r--r--app/Console/PluginUninstallCommand.php3
-rw-r--r--app/Console/PluginUpgradeCommand.php3
3 files changed, 6 insertions, 3 deletions
diff --git a/app/Console/PluginInstallCommand.php b/app/Console/PluginInstallCommand.php
index 1c6e14b3..a82f0069 100644
--- a/app/Console/PluginInstallCommand.php
+++ b/app/Console/PluginInstallCommand.php
@@ -4,6 +4,7 @@ namespace Kanboard\Console;
use Kanboard\Core\Plugin\Installer;
use Kanboard\Core\Plugin\PluginInstallerException;
+use LogicException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -21,7 +22,7 @@ class PluginInstallCommand extends BaseCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
if (!Installer::isConfigured()) {
- $output->writeln('<error>Kanboard is not configured to install plugins itself</error>');
+ throw new LogicException('Kanboard is not configured to install plugins itself');
}
try {
diff --git a/app/Console/PluginUninstallCommand.php b/app/Console/PluginUninstallCommand.php
index c645e03f..48722130 100644
--- a/app/Console/PluginUninstallCommand.php
+++ b/app/Console/PluginUninstallCommand.php
@@ -4,6 +4,7 @@ namespace Kanboard\Console;
use Kanboard\Core\Plugin\Installer;
use Kanboard\Core\Plugin\PluginInstallerException;
+use LogicException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -21,7 +22,7 @@ class PluginUninstallCommand extends BaseCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
if (!Installer::isConfigured()) {
- $output->writeln('<error>Kanboard is not configured to remove plugins itself</error>');
+ throw new LogicException('Kanboard is not configured to install plugins itself');
}
try {
diff --git a/app/Console/PluginUpgradeCommand.php b/app/Console/PluginUpgradeCommand.php
index 839124b1..6c66e917 100644
--- a/app/Console/PluginUpgradeCommand.php
+++ b/app/Console/PluginUpgradeCommand.php
@@ -5,6 +5,7 @@ namespace Kanboard\Console;
use Kanboard\Core\Plugin\Base as BasePlugin;
use Kanboard\Core\Plugin\Directory;
use Kanboard\Core\Plugin\Installer;
+use LogicException;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -21,7 +22,7 @@ class PluginUpgradeCommand extends BaseCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
if (!Installer::isConfigured()) {
- $output->writeln('<error>Kanboard is not configured to upgrade plugins itself</error>');
+ throw new LogicException('Kanboard is not configured to install plugins itself');
}
$installer = new Installer($this->container);