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)
|
||||
else parse(command, state.nonMultiParser)) match {
|
||||
case Right(s) => s() // apply command. command side effects happen here
|
||||
|
|
|
|||
|
|
@ -11,16 +11,22 @@ package sbt
|
|||
import java.io.PrintWriter
|
||||
import java.util.concurrent.RejectedExecutionException
|
||||
import java.util.Properties
|
||||
import sbt.BasicCommandStrings.{StashOnFailure, networkExecPrefix}
|
||||
import sbt.BasicCommandStrings.{ StashOnFailure, networkExecPrefix }
|
||||
import sbt.internal.ShutdownHooks
|
||||
import sbt.internal.langserver.ErrorCodes
|
||||
import sbt.internal.protocol.JsonRpcResponseError
|
||||
import sbt.internal.nio.CheckBuildSources.CheckBuildSourcesKey
|
||||
import sbt.internal.util.{AttributeKey, ErrorHandling, GlobalLogBacking, Prompt, Terminal => ITerminal}
|
||||
import sbt.internal.{ShutdownHooks, TaskProgress}
|
||||
import sbt.io.{IO, Using}
|
||||
import sbt.internal.util.{
|
||||
AttributeKey,
|
||||
ErrorHandling,
|
||||
GlobalLogBacking,
|
||||
Prompt,
|
||||
Terminal => ITerminal
|
||||
}
|
||||
import sbt.internal.{ ShutdownHooks, TaskProgress }
|
||||
import sbt.io.{ IO, Using }
|
||||
import sbt.protocol._
|
||||
import sbt.util.{Logger, LoggerContext}
|
||||
import sbt.util.{ Logger, LoggerContext }
|
||||
|
||||
import scala.annotation.tailrec
|
||||
import scala.concurrent.duration._
|
||||
|
|
|
|||
Loading…
Reference in New Issue