10000 Check the option names for values never and always · symfony/symfony@9063c5a · GitHub
[go: up one dir, main page]

Skip to content

Commit 9063c5a

Browse files
Check the option names for values never and always
1 parent 74c89dd commit 9063c5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ if (false === $COMPOSER = \getenv('COMPOSER_BINARY')) {
7272
? (file_get_contents($COMPOSER, false, null, 0, 18) === '#!/usr/bin/env php' ? $PHP : '').' '.escapeshellarg($COMPOSER) // detect shell wrappers by looking at the shebang
7373
: 'composer';
7474
}
75-
if (in_array('never', $argv, true) || in_array('--colors=never', $argv, true)) {
75+
if (in_array('--colors=never', $argv, true) || ($argv[array_search('never', $argv, true) - 1] ?? '') === '--colors') {
7676
$COMPOSER .= ' --no-ansi';
77-
} elseif (in_array('always', $argv, true) || in_array('colors=always', $argv, true)) {
77+
} elseif (in_array('--colors=always', $argv, true) || ($argv[array_search('always', $argv, true) - 1] ?? '') === '--colors') {
7878
$COMPOSER .= ' --ansi';
7979
}
8080

0 commit comments

Comments
 (0)
0