mirror of https://github.com/sbt/sbt.git
[2.x] fix: Start server when explicitly requested via BSP/thin client (#8529)
Fixes #7481 When sbt is started by a remote client (BSP or thin client via --server flag), always start the server regardless of autoStartServer setting. The autoStartServer setting is meant for automatic server startup, not for blocking explicit server start requests.
This commit is contained in:
parent
7b33362245
commit
f85ced45f2
|
|
@ -153,7 +153,8 @@ private[sbt] final class CommandExchange {
|
|||
|
||||
def run(s: State): State = run(s, s.get(autoStartServer).getOrElse(true))
|
||||
def run(s: State, autoStart: Boolean): State = {
|
||||
if (autoStartServerSysProp && autoStart) runServer(s)
|
||||
val startedByRemote = Terminal.startedByRemoteClient
|
||||
if (autoStartServerSysProp && (autoStart || startedByRemote)) runServer(s)
|
||||
else s
|
||||
}
|
||||
private[sbt] def setState(s: State): Unit = lastState.set(s)
|
||||
|
|
|
|||
Loading…
Reference in New Issue