Instruct how to get into interactive mode directly

This commit is contained in:
Dale Wijnand 2017-03-07 13:30:56 +00:00
parent 019f92dc93
commit 1c614fd699
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
1 changed files with 4 additions and 2 deletions

View File

@ -67,8 +67,10 @@ object MainLoop {
val loggedState = state.copy(globalLogging = newLogging)
def isInteractive = System.console() != null
def hasShell = state.remainingCommands contains "shell"
if (isInteractive && !hasShell)
state.log warn "Executing in batch mode; for better performance, hit [ENTER] to remain in the sbt shell"
if (isInteractive && !hasShell) {
state.log warn "BATCH MODE: for better performance hit [ENTER] to switch to interactive mode"
state.log warn " consider launching sbt without any commands, or explicitly passing 'shell'"
}
try run(loggedState) finally out.close()
}