summaryrefslogtreecommitdiff
path: root/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'parse.go')
-rw-r--r--parse.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.go b/parse.go
index e5df067..aee60e7 100644
--- a/parse.go
+++ b/parse.go
@@ -656,7 +656,7 @@ func (p *Parser) process(args []string) error {
// lookup the spec for this option (note that the "specs" slice changes as
// we expand subcommands so it is better not to use a map)
spec := findOption(specs, opt)
- if spec == nil {
+ if spec == nil || opt == "" {
return fmt.Errorf("unknown argument %s", arg)
}
wasPresent[spec] = true