@ -48,8 +48,15 @@ class DevCommand : CliktCommand("dev") {
|
||||
override val treatUnknownOptionsAsArgs = true
|
||||
|
||||
init {
|
||||
println(System.getProperty("os.name").lowercase()
|
||||
.let { osName -> listOf("mac", "nix", "sunos", "solaris", "bsd").any { it in osName } })
|
||||
val osName = System.getProperty("os.name").lowercase()
|
||||
|
||||
val result = when {
|
||||
"windows" in osName -> "Windows"
|
||||
listOf("mac", "nix", "sunos", "solaris", "bsd").any { it in osName } -> "*nix"
|
||||
else -> "Other"
|
||||
}
|
||||
|
||||
println(result)
|
||||
}
|
||||
|
||||
val server by argument().help("Server Template")
|
||||
|
||||
Reference in New Issue
Block a user