mirror of https://github.com/sbt/sbt.git
Don't warn on server command
This commit is contained in:
parent
7ffae0f7df
commit
15255c15b0
|
|
@ -73,13 +73,14 @@ object MainLoop {
|
|||
// transferLevels(state, newLogging)
|
||||
val loggedState = state.copy(globalLogging = newLogging)
|
||||
def isInteractive = System.console() != null
|
||||
def hasShell = state.remainingCommands contains "shell"
|
||||
def hasCommand(cmd: String): Boolean =
|
||||
(state.remainingCommands find { x => x.commandLine == cmd }).isDefined
|
||||
/**
|
||||
* The "boot" command adds "iflast shell" ("if last shell")
|
||||
* which basically means it falls back to shell if there are no further commands
|
||||
*/
|
||||
def endsWithBoot = state.remainingCommands.lastOption exists (_ == "boot")
|
||||
if (isInteractive && !hasShell && !endsWithBoot) {
|
||||
def endsWithBoot = state.remainingCommands.lastOption exists (_.commandLine == "boot")
|
||||
if (isInteractive && !hasCommand("shell") && !hasCommand("server") && !endsWithBoot) {
|
||||
state.log warn "Executing in batch mode."
|
||||
state.log warn " For better performance, hit [ENTER] to switch to interactive mode, or"
|
||||
state.log warn " consider launching sbt without any commands, or explicitly passing 'shell'"
|
||||
|
|
|
|||
Loading…
Reference in New Issue