Add Dev Command
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2025-10-25 23:36:32 +02:00
parent 408184bade
commit e0e607e8b4

View File

@ -16,6 +16,7 @@ import com.github.ajalt.clikt.parameters.types.file
import com.github.ajalt.clikt.parameters.types.long
import com.sun.security.auth.module.UnixSystem
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.joinAll
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import java.io.File
@ -183,15 +184,19 @@ class DevCommand : CliktCommand("dev") {
*command
).directory(serverDir).start()
launch {
val input = launch {
process.inputStream.transferTo(System.out)
}
launch {
val error = launch {
process.errorStream.transferTo(System.err)
}
launch {
val console = launch {
System.`in`.transferTo(process.outputStream)
}
process.waitFor()
input.cancel()
error.cancel()
console.cancel()
joinAll(input, error, console)
}
}