Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Commit bcf490b

Browse files
committed
Fix end index of command factory args
1 parent 9acfb74 commit bcf490b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/slack/cli/CommandFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public fun runCommand(args: List<String>, exitOnError: Boolean = true) {
4848
val commandArgs =
4949
when (args.size) {
5050
1 -> emptyList()
51-
else -> args.subList(1, args.lastIndex)
51+
else -> args.subList(1, args.size)
5252
}
5353

5454
commands[command]?.create()?.main(commandArgs) ?: error("Unknown command: '$command'")

0 commit comments

Comments
 (0)