I have a very simple scala program:
object TakeInputs { def main(args: Array[String]) { val name = readLine("What is your name?") println(name) } }
When I try to run this using sbt "project myproject" "run-main TakeInput" it does not wait for user input, and the program just ends up What is your name?null as an output.
Is there a way to make sbt wait for user input (for example, what happens if readLine is run in the sbt console)? I can provide inputs as command line parameters, but I have a lot of them, and I would like to make the program more convenient for the user, showing messages that the user should enter next. Thank you
command-line scala sbt user-input
Xiang
source share