1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

Fix CLI -r error

Fix https://github.com/vimeo/psalm/issues/10418
This commit is contained in:
kkmuffme 2023-12-02 09:04:37 +01:00
parent f9f8bacdf1
commit c6bf949c71

View File

@ -231,7 +231,7 @@ final class CliUtils
}
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;
@ -271,7 +271,7 @@ final class CliUtils
$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;
@ -287,6 +287,7 @@ final class CliUtils
$ignored_arguments = array(
'config',
'printer',
'root',
);
if (in_array(substr($input_path, 2), $ignored_arguments, true)) {