mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Properly warn when a short option is invalid. (#2280)
Previously, Psalm would not warn or exit - it would skip over the arg and continue with analysis.
This commit is contained in:
parent
0ac5c32f2f
commit
f40fe86321
@ -110,7 +110,7 @@ array_map(
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
} elseif (substr($arg, 0, 2) === '-' && $arg !== '-' && $arg !== '--') {
|
||||
} elseif (substr($arg, 0, 1) === '-' && $arg !== '-' && $arg !== '--') {
|
||||
$arg_name = preg_replace('/=.*$/', '', substr($arg, 1));
|
||||
|
||||
if (!in_array($arg_name, $valid_short_options) && !in_array($arg_name . ':', $valid_short_options)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user