Add highlight style
parent
8675d4eb6a
commit
c7deaa8a1f
|
@ -15,6 +15,9 @@ namespace Composer\Console;
|
||||||
use Symfony\Component\Console\Application as BaseApplication;
|
use Symfony\Component\Console\Application as BaseApplication;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||||
|
use Symfony\Component\Console\Formatter\OutputFormatter;
|
||||||
|
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
||||||
use Symfony\Component\Finder\Finder;
|
use Symfony\Component\Finder\Finder;
|
||||||
use Composer\Command;
|
use Composer\Command;
|
||||||
use Composer\Composer;
|
use Composer\Composer;
|
||||||
|
@ -40,12 +43,21 @@ class Application extends BaseApplication
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the current application.
|
* {@inheritDoc}
|
||||||
*
|
*/
|
||||||
* @param InputInterface $input An Input instance
|
public function run(InputInterface $input = null, OutputInterface $output = null)
|
||||||
* @param OutputInterface $output An Output instance
|
{
|
||||||
*
|
if (null === $output) {
|
||||||
* @return integer 0 if everything went fine, or an error code
|
$styles['highlight'] = new OutputFormatterStyle('red');
|
||||||
|
$formatter = new OutputFormatter(null, $styles);
|
||||||
|
$output = new ConsoleOutput(ConsoleOutput::VERBOSITY_NORMAL, null, $formatter);
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::run($input, $output);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public function doRun(InputInterface $input, OutputInterface $output)
|
public function doRun(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue