Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fe4920b

Browse filesBrowse files
[PhpUnitBridge] Fix support for the NO_COLOR env var
1 parent 094729f commit fe4920b
Copy full SHA for fe4920b

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ class_exists(\SymfonyExcludeListSimplePhpunit::class, false) && PHPUnit\Util\Bla
368368
}
369369
}
370370

371-
$cmd[0] = sprintf('%s %s --colors=always', $PHP, escapeshellarg("$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit"));
371+
$cmd[0] = sprintf('%s %s --colors=%s', $PHP, escapeshellarg("$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit"), false === $getEnvVar('NO_COLOR') ? 'always' : 'never');
372372
$cmd = str_replace('%', '%%', implode(' ', $cmd)).' %1$s';
373373

374374
if ('\\' === \DIRECTORY_SEPARATOR) {
@@ -435,7 +435,7 @@ class SymfonyExcludeListSimplePhpunit
435435
{
436436
}
437437
}
438-
array_splice($argv, 1, 0, ['--colors=always']);
438+
array_splice($argv, 1, 0, ['--colors='.(false === $getEnvVar('NO_COLOR') ? 'always' : 'never')]);
439439
$_SERVER['argv'] = $argv;
440440
$_SERVER['argc'] = ++$argc;
441441
include "$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit";

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.