``` val fp = popen(commandToExecute, "r") ?: er...
# kotlin-native
j
Copy code
val fp = popen(commandToExecute, "r") ?: error("Failed to run command: $command")
    val status = pclose(fp)
I have a windows specific bug and I have. no idea where to start I implemented a function to execute an external command and get its output It works fine on macOS/Linux but it gives a compilation error on windows https://github.com/jmfayard/kotlin-cli-starter/runs/2583168375?check_suite_focus=true#step:5:73 https://github.com/jmfayard/kotlin-cli-starter/blob/9d9b6a8081281db159e80574c872048332bc254c/src/nativeMain/kotlin/io/NativeActuals.kt#L20-L49
n
Do note that Windows isn't POSIX compliant.