Minor tweaks on CLI application

This commit is contained in:
Romain Neutron
2014-01-06 14:58:15 +01:00
parent 09596e1451
commit 947b746ca1
2 changed files with 6 additions and 1 deletions

View File

@@ -102,4 +102,4 @@ $cli['console']->addCommands(array(
new ValidateSchemaCommand(),
));
exit($cli->runCLI());
exit(is_int($cli->run()) ? : 1);

View File

@@ -12,6 +12,7 @@
namespace Alchemy\Phrasea;
use Alchemy\Phrasea\Command\CommandInterface;
use Alchemy\Phrasea\Exception\RuntimeException;
use Symfony\Component\Console;
use Alchemy\Phrasea\Core\CLIProvider\CLIDriversServiceProvider;
use Alchemy\Phrasea\Core\CLIProvider\ComposerSetupServiceProvider;
@@ -77,6 +78,10 @@ class CLI extends Application
public function run(\Symfony\Component\HttpFoundation\Request $request = null)
{
if (null !== $request) {
throw new RuntimeException('Phraseanet Konsole can not run Http Requests.');
}
$this->runCLI();
}