forked from SteamWar/SteamWar
Format code
This commit is contained in:
@@ -8,11 +8,12 @@ import com.github.ajalt.clikt.parameters.options.flag
|
||||
import com.github.ajalt.clikt.parameters.options.option
|
||||
import de.steamwar.db.Database
|
||||
|
||||
class DatabaseCommand: CliktCommand(name = "db") {
|
||||
class DatabaseCommand : CliktCommand(name = "db") {
|
||||
val useProduction by option().flag()
|
||||
val db by findOrSetObject { Database }
|
||||
|
||||
override fun help(context: Context): String = "Run database commands"
|
||||
override fun help(context: Context): String =
|
||||
"Run database commands"
|
||||
|
||||
override fun run() {
|
||||
if (!useProduction && db.database == "production") {
|
||||
|
||||
Reference in New Issue
Block a user