We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37fd267 commit 8dc5560Copy full SHA for 8dc5560
src/main/kotlin/kscript/app/model/OsType.kt
@@ -9,6 +9,8 @@ enum class OsType(val osName: String) {
9
10
companion object {
11
fun findOrThrow(name: String) =
12
- values().find { it.osName.equals(name, true) } ?: throw IllegalArgumentException("Unsupported OS: $name")
+ //Exact comparison (it.osName.equals(name, true)) seems to be not feasible as there is also e.g. "darwin21"
13
+ //and maybe even other osTypes: specific versions of os'es shouldn't belong to OsType.
14
+ values().find { name.contains(it.osName, true) } ?: throw IllegalArgumentException("Unsupported OS: $name")
15
}
16
0 commit comments