Skip to content

Commit 207b074

Browse files
committed
fix(cli): accept "-" as log file
"-" was recognized as undefined flag previously. Update goNixArgParser: fix: treate undefined-prefix itself as regular arg
1 parent c5000d0 commit 207b074

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/goNixArgParser/optionSet.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (s *OptionSet) isGroupSep(input string) bool {
8080

8181
func (s *OptionSet) isUdefFlag(input string) bool {
8282
for _, prefix := range s.undefFlagPrefixes {
83-
if strings.HasPrefix(input, prefix) {
83+
if len(input) > len(prefix) && strings.HasPrefix(input, prefix) {
8484
return true
8585
}
8686
}

0 commit comments

Comments
 (0)