mirror of
https://github.com/gay-pizza/jaarg.git
synced 2026-11-04 18:42:20 +00:00
Fix required parameters being misinterpreted as required positionals
This commit is contained in:
1 parent
3030c5cad9
commit
6397ce61d9
1 file changed
+1
-1
+1
-1
@@ -138,7 +138,7 @@ impl<ID: 'static> Opts<ID> {
|
|||||||
|
|
||||||
// Ensure that all required positional arguments have been provided
|
// Ensure that all required positional arguments have been provided
|
||||||
for option in self.options[state.positional_index..].iter() {
|
for option in self.options[state.positional_index..].iter() {
|
||||||
if option.required {
|
if option.r#type == OptType::Positional && option.required {
|
||||||
error(ParseError::RequiredPositional(option.first_name()));
|
error(ParseError::RequiredPositional(option.first_name()));
|
||||||
return ParseResult::ExitError;
|
return ParseResult::ExitError;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user