mirror of https://github.com/sbt/sbt.git
filter out `bspReload` to avoid triggering an additional reload if bspReload is in the remaining commands #8371
This commit is contained in:
parent
67b4434507
commit
5d42dd65c8
|
|
@ -62,7 +62,7 @@ object BuildServerProtocol {
|
|||
jvmTestEnvironmentProvider = true,
|
||||
)
|
||||
|
||||
private val bspReload = "bspReload"
|
||||
val bspReload = "bspReload"
|
||||
|
||||
private val targetIdentifierParser: Parser[Seq[BuildTargetIdentifier]] =
|
||||
Def
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import sbt.ProjectExtra.extract
|
|||
import sbt.Scope.Global
|
||||
import sbt.internal.CommandStrings.LoadProject
|
||||
import sbt.internal.SysProp
|
||||
import sbt.internal.server.BuildServerProtocol
|
||||
import sbt.internal.util.{ AttributeKey, Terminal }
|
||||
import sbt.io.syntax.*
|
||||
import sbt.nio.FileChanges
|
||||
|
|
@ -93,7 +94,7 @@ private[sbt] class CheckBuildSources extends AutoCloseable {
|
|||
val commands =
|
||||
allCmds.flatMap(_.split(";").flatMap(_.trim.split(" ").headOption).filterNot(_.isEmpty))
|
||||
val filter = (c: String) =>
|
||||
c == LoadProject || c == RebootCommand || c == TerminateAction || c == Shutdown ||
|
||||
c == LoadProject || c == BuildServerProtocol.bspReload || c == RebootCommand || c == TerminateAction || c == Shutdown ||
|
||||
c.startsWith("sbtReboot")
|
||||
val resetState = commands.exists(filter)
|
||||
if (resetState) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue