Fix patch error

This commit is contained in:
Eugene Yokota 2017-04-04 19:59:25 -04:00
parent c41d428dbc
commit 7ffae0f7df
1 changed files with 1 additions and 8 deletions

View File

@ -205,16 +205,9 @@ object State {
def hasInput = System.console().reader().ready()
s.remainingCommands match {
case List() => if (isInteractive && hasInput) doX(Exec("shell", s.source), Nil) else exit(true)
case List(x, xs @ _*) => doX(x, xs)
case List(x, xs @ _*) => doX(x, xs.toList)
}
}
s.remainingCommands match {
case List() => exit(true)
case x :: xs =>
log.debug(s"> $x")
f(x, s.copy(remainingCommands = xs, currentCommand = Some(x), history = x :: s.history))
}
def :::(newCommands: List[String]): State = ++:(newCommands map { Exec(_, s.source) })
def ++:(newCommands: List[Exec]): State = s.copy(remainingCommands = newCommands ::: s.remainingCommands)
def ::(command: String): State = +:(Exec(command, s.source))