From 1ddb720922c4606ff05f762ce98a021924f3958c Mon Sep 17 00:00:00 2001 From: Fbenas Date: Sun, 14 Jun 2020 20:57:06 +0100 Subject: Update blairc version --- composer.json | 2 +- src/IRC/Application.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 353ee5f..25d2db0 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ } ], "require": { - "fbeans/blairc": "0.1", + "fbeans/blairc": "0.2", "symfony/process": "^5.2@dev", "symfony/console": "^5.2" }, diff --git a/src/IRC/Application.php b/src/IRC/Application.php index 4bb6d71..8a5f051 100644 --- a/src/IRC/Application.php +++ b/src/IRC/Application.php @@ -10,7 +10,7 @@ use Symfony\Component\Process\Process; class Application extends BlaApplication { - public function command(): Command + public function commands(): Array { $command = new Command; $command->setName('task:list'); @@ -29,19 +29,19 @@ class Application extends BlaApplication } $process = new Process($process_argument); - + $process->run(); if (!$process->isSuccessful()) { $output->write($process->getErrorOutput()); return Command::SUCCESS; } - - $output->write($process->getOutput()); + $array_output = explode("\n", $process->getOutput()); + $output->writeLn($array_output[count($array_output) - 2]); return Command::FAILURE; } ); - return $command; + return [$command]; } } -- cgit v1.2.3