1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Fix #244 - ignore --ansi args after xdebug turned off

This commit is contained in:
Matthew Brown 2017-10-13 21:16:34 -04:00
parent 5eb7d541d4
commit 6c1587d4ab

View File

@ -170,12 +170,17 @@ foreach ($autoload_files as $file) {
(new \Composer\XdebugHandler(\Composer\Factory::createOutput()))->check();
if (isset($options['i'])) {
$args = array_slice($argv, 2);
if (file_exists('psalm.xml')) {
die('A config file already exists in the current directory' . PHP_EOL);
}
$args = array_filter(
array_slice($argv, 2),
function ($arg) {
return $arg !== '--ansi' && $arg !== '--no-ansi';
}
);
$level = 3;
$source_dir = 'src';