mirror of https://github.com/sbt/sbt.git
Merge pull request #4054 from eed3si9n/wip/repl
Fix console, JLine issue
This commit is contained in:
commit
9b3694e443
|
|
@ -9,8 +9,8 @@ package sbt
|
|||
|
||||
import java.io.File
|
||||
import sbt.internal.inc.AnalyzingCompiler
|
||||
import sbt.internal.util.JLine
|
||||
import sbt.util.Logger
|
||||
|
||||
import xsbti.compile.{ Inputs, Compilers }
|
||||
import scala.util.Try
|
||||
|
||||
|
|
@ -41,11 +41,10 @@ final class Console(compiler: AnalyzingCompiler) {
|
|||
implicit log: Logger): Try[Unit] = {
|
||||
def console0() =
|
||||
compiler.console(classpath, options, initialCommands, cleanupCommands, log)(loader, bindings)
|
||||
// TODO: Fix JLine
|
||||
//JLine.withJLine(Run.executeTrapExit(console0, log))
|
||||
Run.executeTrapExit(console0, log)
|
||||
JLine.withJLine(Run.executeTrapExit(console0, log))
|
||||
}
|
||||
}
|
||||
|
||||
object Console {
|
||||
def apply(conf: Inputs): Console =
|
||||
conf.compilers match {
|
||||
|
|
|
|||
|
|
@ -1373,10 +1373,8 @@ object Defaults extends BuildCommon {
|
|||
val sc = (scalacOptions in task).value
|
||||
val ic = (initialCommands in task).value
|
||||
val cc = (cleanupCommands in task).value
|
||||
JLine.usingTerminal { _ =>
|
||||
(new Console(compiler))(cpFiles, sc, loader, ic, cc)()(s.log).get
|
||||
println()
|
||||
}
|
||||
(new Console(compiler))(cpFiles, sc, loader, ic, cc)()(s.log).get
|
||||
println()
|
||||
}
|
||||
|
||||
private[this] def exported(w: PrintWriter, command: String): Seq[String] => Unit =
|
||||
|
|
|
|||
Loading…
Reference in New Issue