mirror of
https://github.com/ipfs/kubo.git
synced 2025-05-21 00:47:22 +08:00
parse: improve stdin fix
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user