Skip to content

Commit

Permalink
Merge pull request #22 from morozov/issues/21
Browse files Browse the repository at this point in the history
Enforce --no-colors in CI mode
  • Loading branch information
mnapoli authored Feb 14, 2020
2 parents 1ae3e57 + 1c15e29 commit 038549e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pretty
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ $commands = [
*/
'ci' => [
'php-cs-fixer' => 'php-cs-fixer fix --dry-run --allow-risky=yes --diff --using-cache=no',
'phpcs' => 'phpcs --no-cache',
'default' => 'phpcs --standard=PSR2 --extensions=php --ignore="vendor/*" --no-cache .',
'phpcs' => 'phpcs --no-cache --no-colors',
'default' => 'phpcs --standard=PSR2 --extensions=php --ignore="vendor/*" --no-cache --no-colors .',
],
];

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

passthru($program." --version");
Expand Down Expand Up @@ -88,7 +88,7 @@ function commandExists($command)
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$return = shell_exec('where ' . escapeshellarg($command));
} else {
$return = shell_exec('which ' . escapeshellarg($command));
$return = shell_exec('which ' . escapeshellarg($command));
}
return !empty($return);
}
Expand Down

0 comments on commit 038549e

Please sign in to comment.