mirror of
https://github.com/ipfs/kubo.git
synced 2025-05-20 16:36:46 +08:00
commands/cli: Fixed bug when parsing args for a command that doesn't have any argument definitions
This commit is contained in:

committed by
Juan Batiz-Benet

parent
1abe97617e
commit
9370740db0
@ -154,7 +154,7 @@ func parseArgs(stringArgs []string, stdin *os.File, arguments []cmds.Argument) (
|
||||
var argDef cmds.Argument
|
||||
if argDefIndex < len(arguments) {
|
||||
argDef = arguments[argDefIndex]
|
||||
} else {
|
||||
} else if len(arguments) > 0 {
|
||||
argDef = arguments[len(arguments)-1]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user