mirror of https://github.com/sbt/sbt.git
Add method overload to keep binary compatibility
This commit is contained in:
parent
82ae293e3f
commit
0f53349ce9
|
|
@ -184,7 +184,9 @@ object Command {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
def process(command: String, state: State, onParseError: String => Unit = _ => ()): State = {
|
// overload instead of default parameter to keep binary compatibility
|
||||||
|
def process(command: String, state: State): State = process(command, state, _ => ())
|
||||||
|
def process(command: String, state: State, onParseError: String => Unit): State = {
|
||||||
(if (command.contains(";")) parse(command, state.combinedParser)
|
(if (command.contains(";")) parse(command, state.combinedParser)
|
||||||
else parse(command, state.nonMultiParser)) match {
|
else parse(command, state.nonMultiParser)) match {
|
||||||
case Right(s) => s() // apply command. command side effects happen here
|
case Right(s) => s() // apply command. command side effects happen here
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,13 @@ import sbt.internal.ShutdownHooks
|
||||||
import sbt.internal.langserver.ErrorCodes
|
import sbt.internal.langserver.ErrorCodes
|
||||||
import sbt.internal.protocol.JsonRpcResponseError
|
import sbt.internal.protocol.JsonRpcResponseError
|
||||||
import sbt.internal.nio.CheckBuildSources.CheckBuildSourcesKey
|
import sbt.internal.nio.CheckBuildSources.CheckBuildSourcesKey
|
||||||
import sbt.internal.util.{AttributeKey, ErrorHandling, GlobalLogBacking, Prompt, Terminal => ITerminal}
|
import sbt.internal.util.{
|
||||||
|
AttributeKey,
|
||||||
|
ErrorHandling,
|
||||||
|
GlobalLogBacking,
|
||||||
|
Prompt,
|
||||||
|
Terminal => ITerminal
|
||||||
|
}
|
||||||
import sbt.internal.{ ShutdownHooks, TaskProgress }
|
import sbt.internal.{ ShutdownHooks, TaskProgress }
|
||||||
import sbt.io.{ IO, Using }
|
import sbt.io.{ IO, Using }
|
||||||
import sbt.protocol._
|
import sbt.protocol._
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue