Use NoOpCliktCommand to replace the empty run methods

Signed-off-by: Graham <gpe@openrs2.dev>
bzip2
Graham 5 years ago
parent c9a2b14dfa
commit 4a40b2cc68
  1. 8
      all/src/main/java/dev/openrs2/Command.kt
  2. 8
      compress-cli/src/main/java/dev/openrs2/compress/cli/CompressCommand.kt

@ -1,6 +1,6 @@
package dev.openrs2
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.NoOpCliktCommand
import com.github.ajalt.clikt.core.subcommands
import dev.openrs2.bundler.BundleCommand
import dev.openrs2.compress.cli.CompressCommand
@ -12,7 +12,7 @@ import dev.openrs2.game.GameCommand
fun main(args: Array<String>) = Command().main(args)
class Command : CliktCommand(name = "openrs2") {
class Command : NoOpCliktCommand(name = "openrs2") {
init {
subcommands(
BundleCommand(),
@ -24,8 +24,4 @@ class Command : CliktCommand(name = "openrs2") {
GameCommand()
)
}
override fun run() {
// empty
}
}

@ -1,6 +1,6 @@
package dev.openrs2.compress.cli
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.NoOpCliktCommand
import com.github.ajalt.clikt.core.subcommands
import dev.openrs2.compress.cli.bzip2.Bunzip2Command
import dev.openrs2.compress.cli.bzip2.Bzip2Command
@ -11,7 +11,7 @@ import dev.openrs2.compress.cli.gzip.GzipCommand
fun main(args: Array<String>) = CompressCommand().main(args)
class CompressCommand : CliktCommand(name = "compress") {
class CompressCommand : NoOpCliktCommand(name = "compress") {
init {
subcommands(
Bzip2Command(),
@ -22,8 +22,4 @@ class CompressCommand : CliktCommand(name = "compress") {
GunzipCommand()
)
}
override fun run() {
// empty
}
}

Loading…
Cancel
Save