mirror of https://github.com/sbt/sbt.git
Cleanup BatchScriptRunner
This commit is contained in:
parent
b8abf4285f
commit
cb2e4e67fd
|
|
@ -43,9 +43,8 @@ private[sbt] class BatchScriptRunner extends ScriptRunner {
|
||||||
def processStatement(handler: StatementHandler, statement: Statement, states: States): Unit = {
|
def processStatement(handler: StatementHandler, statement: Statement, states: States): Unit = {
|
||||||
val state = states(handler).asInstanceOf[handler.State]
|
val state = states(handler).asInstanceOf[handler.State]
|
||||||
val nextState =
|
val nextState =
|
||||||
try { Right(handler(statement.command, statement.arguments, state)) } catch {
|
try Right(handler(statement.command, statement.arguments, state))
|
||||||
case e: Exception => Left(e)
|
catch { case e: Exception => Left(e) }
|
||||||
}
|
|
||||||
nextState match {
|
nextState match {
|
||||||
case Left(err) =>
|
case Left(err) =>
|
||||||
if (statement.successExpected) {
|
if (statement.successExpected) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue