mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
fix: don't decorate output if --colors=never is set
This commit is contained in:
5
bin/pest
5
bin/pest
@ -6,6 +6,7 @@ use Pest\Actions\ValidatesEnvironment;
|
|||||||
use Pest\Console\Command;
|
use Pest\Console\Command;
|
||||||
use Pest\Support\Container;
|
use Pest\Support\Container;
|
||||||
use Pest\TestSuite;
|
use Pest\TestSuite;
|
||||||
|
use Symfony\Component\Console\Input\ArgvInput;
|
||||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
@ -27,7 +28,9 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
$rootPath = getcwd();
|
$rootPath = getcwd();
|
||||||
|
|
||||||
$testSuite = TestSuite::getInstance($rootPath);
|
$testSuite = TestSuite::getInstance($rootPath);
|
||||||
$output = new ConsoleOutput(ConsoleOutput::VERBOSITY_NORMAL, true);
|
|
||||||
|
$isDecorated = (new ArgvInput())->getParameterOption('--colors', 'always') !== 'never';
|
||||||
|
$output = new ConsoleOutput(ConsoleOutput::VERBOSITY_NORMAL, $isDecorated);
|
||||||
|
|
||||||
$container = Container::getInstance();
|
$container = Container::getInstance();
|
||||||
$container->add(TestSuite::class, $testSuite);
|
$container->add(TestSuite::class, $testSuite);
|
||||||
|
|||||||
Reference in New Issue
Block a user