From febccde3e787fbf69a20b3e05ecc07f77efebfc5 Mon Sep 17 00:00:00 2001 From: William Narmontas Date: Sat, 24 Jul 2021 19:59:00 +0100 Subject: [PATCH] Building on #6353 to help identify the issue of #6101 for Windows users. --- main/src/main/scala/sbt/Main.scala | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/main/src/main/scala/sbt/Main.scala b/main/src/main/scala/sbt/Main.scala index f9771b134..ab92c37d2 100644 --- a/main/src/main/scala/sbt/Main.scala +++ b/main/src/main/scala/sbt/Main.scala @@ -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)