Here is a simple script
fun main() {
print("ready> ")
val input = readLine()
println("User input: $input")
}
When I run this program with gradle runReleaseExecutableMacos
I expect that I'll see a ready>
prompt and will have a possibility to type some chars. But this program finishes immediately with User input: null
as a result.
Am I missing something?
readLine()
==>readLine()!!
– Colettacolette