Skip to content

Commit a9699e4

Browse files
committed
fix(AllowLeadingHyphen): fixes a bug where valid args aren't recognized with this setting
Closes #588
1 parent 0dcfc77 commit a9699e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ impl<'a, 'b> Parser<'a, 'b>
753753
name: sc_name,
754754
matches: sc_m.into(),
755755
});
756-
} else {
756+
} else if !self.settings.is_set(AppSettings::AllowLeadingHyphen) {
757757
return Err(Error::unknown_argument(&*arg_os.to_string_lossy(),
758758
"",
759759
&*self.create_current_usage(matcher),

0 commit comments

Comments
 (0)