Skip to content

Commit 038549e

Browse files
authored
Merge pull request #22 from morozov/issues/21
Enforce --no-colors in CI mode
2 parents 1ae3e57 + 1c15e29 commit 038549e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pretty

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ $commands = [
2727
*/
2828
'ci' => [
2929
'php-cs-fixer' => 'php-cs-fixer fix --dry-run --allow-risky=yes --diff --using-cache=no',
30-
'phpcs' => 'phpcs --no-cache',
31-
'default' => 'phpcs --standard=PSR2 --extensions=php --ignore="vendor/*" --no-cache .',
30+
'phpcs' => 'phpcs --no-cache --no-colors',
31+
'default' => 'phpcs --standard=PSR2 --extensions=php --ignore="vendor/*" --no-cache --no-colors .',
3232
],
3333
];
3434

@@ -52,7 +52,7 @@ $command = '';
5252
if (file_exists('.phpcs.xml') || file_exists('phpcs.xml') || file_exists('.phpcs.xml.dist') || file_exists('phpcs.xml.dist')) {
5353
echo "PHP CodeSniffer configuration file found, running CodeSniffer with version\n";
5454
$command = $commands['phpcs'];
55-
$program = explode(' ', $command, 1)[0];
55+
$program = explode(' ', $command, 2)[0];
5656
assertPhpCodeSnifferIsInstalled($program);
5757

5858
passthru($program." --version");
@@ -88,7 +88,7 @@ function commandExists($command)
8888
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
8989
$return = shell_exec('where ' . escapeshellarg($command));
9090
} else {
91-
$return = shell_exec('which ' . escapeshellarg($command));
91+
$return = shell_exec('which ' . escapeshellarg($command));
9292
}
9393
return !empty($return);
9494
}

0 commit comments

Comments
 (0)