Merge pull request #6605 from ScalaWilliam/more-verbose-server-exception

Building on #6353 to help identify the issue of #6101 for Windows users.
This commit is contained in:
eugene yokota 2021-07-31 13:15:34 -04:00 committed by GitHub
commit 47117020ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -146,13 +146,12 @@ private[sbt] object xMain {
catch {
case e: ServerAlreadyBootingException
if System.console != null && !ITerminal.startedByRemoteClient =>
println(
s"sbt thinks that server is already booting because of this exception:\n${e.getCause}\nCreate a new server? y/n (default y)"
)
val exit = ITerminal.get.withRawInput(System.in.read) match {
case 110 => Some(Exit(1))
case _ => None
}
println("sbt thinks that server is already booting because of this exception:")
e.printStackTrace()
println("Create a new server? y/n (default y)")
val exit =
if (ITerminal.get.withRawInput(System.in.read) == 'n'.toInt) Some(Exit(1))
else None
(None, exit)
case _: ServerAlreadyBootingException =>
if (SysProp.forceServerStart) (None, None)