Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitfe4920b

Browse files
[PhpUnitBridge] Fix support for the NO_COLOR env var
1 parent094729f commitfe4920b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp