Skip to content

Commit

Permalink
chore(client): Use SuspendingNoOpCliktCommand to support suspending…
Browse files Browse the repository at this point in the history
… runs

Signed-off-by: Onur Demirci <onur.demirci@bosch.io>
  • Loading branch information
bs-ondem committed Dec 6, 2024
1 parent b9ed3c0 commit abe531e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cli/src/main/kotlin/OrtServerMain.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,16 @@

package org.eclipse.apoapsis.ortserver.cli

import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.main
import com.github.ajalt.clikt.command.SuspendingNoOpCliktCommand
import com.github.ajalt.clikt.command.main

import kotlin.system.exitProcess

const val COMMAND_NAME = "ort-server"

fun main(args: Array<String>) {
suspend fun main(args: Array<String>) {
OrtServerMain().main(args)
exitProcess(0)
}

class OrtServerMain : CliktCommand(COMMAND_NAME) {
override fun run() {
echo("Hello, ORT Server!")
}
}
class OrtServerMain : SuspendingNoOpCliktCommand(COMMAND_NAME)

0 comments on commit abe531e

Please sign in to comment.