mirror of https://github.com/sbt/sbt.git
Merge pull request #6573 from github-samuel-clarenc/bspStartTry
[BSP] Send information when server process fails
This commit is contained in:
commit
31a04c9968
|
|
@ -364,9 +364,14 @@ class NetworkClient(
|
|||
.directory(arguments.baseDirectory)
|
||||
.redirectInput(Redirect.PIPE)
|
||||
processBuilder.environment.put(Terminal.TERMINAL_PROPS, props)
|
||||
val process = processBuilder.start()
|
||||
sbtProcess.set(process)
|
||||
Some(process)
|
||||
Try(processBuilder.start()) match {
|
||||
case Success(process) =>
|
||||
sbtProcess.set(process)
|
||||
Some(process)
|
||||
case Failure(e) =>
|
||||
if (log) console.appendLog(Level.Error, s"Failed to start server : $e")
|
||||
throw new ServerFailedException
|
||||
}
|
||||
case _ =>
|
||||
if (log) {
|
||||
console.appendLog(Level.Info, "sbt server is booting up")
|
||||
|
|
|
|||
Loading…
Reference in New Issue