diff --git a/pretty b/pretty index e68931c..e8c2d70 100755 --- a/pretty +++ b/pretty @@ -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 .', ], ]; @@ -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"); @@ -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); }