fix(command_parser): use correct invalid_flags variable when constructing that error

This commit is contained in:
dusk 2025-03-29 14:34:15 +09:00
parent a5576ad225
commit 3e65d74bc4
No known key found for this signature in database

View file

@ -172,7 +172,7 @@ pub fn parse_command(
if invalid_flags.is_empty().not() {
let mut error = format!(
"Flag{} ",
(misplaced_flags.len() > 1).then_some("s").unwrap_or("")
(invalid_flags.len() > 1).then_some("s").unwrap_or("")
);
for (idx, matched_flag) in invalid_flags.iter().enumerate() {
write!(&mut error, "`-{}`", matched_flag.name).expect("oom");