Commit 9370740d authored by Matt Bell's avatar Matt Bell Committed by Juan Batiz-Benet

commands/cli: Fixed bug when parsing args for a command that doesn't have any argument definitions

parent 1abe9761
......@@ -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]
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment