fun hostOs()

in buildSrc/src/main/kotlin/org/jetbrains/desktop/buildscripts/Platform.kt [35:43]


fun hostOs(): Os {
    val os = System.getProperty("os.name").lowercase()
    return when {
        os.contains("win") -> Os.WINDOWS
        os.contains("mac") -> Os.MACOS
        os.contains("nux") || os.contains("nix") || os.contains("aix") -> Os.LINUX
        else -> error("unsupported os '$os'")
    }
}