Skip to content

Commit

Permalink
Merge pull request #10442 from kkmuffme/add-missing-r-to-args
Browse files Browse the repository at this point in the history
Fix CLI -r error
  • Loading branch information
orklah committed Dec 2, 2023
2 parents f7df43a + c6bf949 commit 8a180e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Psalm/Internal/CliUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public static function getArguments(): array
}

if ($input_path[0] === '-' && strlen($input_path) === 2) {
if ($input_path[1] === 'c' || $input_path[1] === 'f') {
if ($input_path[1] === 'c' || $input_path[1] === 'f' || $input_path[1] === 'r') {
++$i;
}
continue;
Expand Down Expand Up @@ -271,7 +271,7 @@ public static function getPathsToCheck($f_paths): ?array
$input_path = $input_paths[$i];

if ($input_path[0] === '-' && strlen($input_path) === 2) {
if ($input_path[1] === 'c' || $input_path[1] === 'f') {
if ($input_path[1] === 'c' || $input_path[1] === 'f' || $input_path[1] === 'r') {
++$i;
}
continue;
Expand All @@ -287,6 +287,7 @@ public static function getPathsToCheck($f_paths): ?array
$ignored_arguments = array(
'config',
'printer',
'root',
);

if (in_array(substr($input_path, 2), $ignored_arguments, true)) {
Expand Down

0 comments on commit 8a180e6

Please sign in to comment.