diff --git a/commands/cli/parse.go b/commands/cli/parse.go index 4ff7103a0..11003335e 100644 --- a/commands/cli/parse.go +++ b/commands/cli/parse.go @@ -223,7 +223,7 @@ func parseArgs(inputs []string, stdin *os.File, argDefs []cmds.Argument, recursi // if there is at least one ArgDef, we can safely trigger the inputs loop // below to parse stdin. numInputs := len(inputs) - if argDef := getArgDef(0, argDefs); argDef != nil && stdin != nil { + if len(argDefs) > 0 && stdin != nil { numInputs += 1 }