Re-fixing console and JLine

Fixes #3482 take 2

I thought I tested #4054 using a local build, but when I ran 1.1.3, `console` did not display anything that I typed.
Switching to `usingTerminal` which calls `terminal.restore` similar to what I had in 1.1.1 fixes `console`.
This commit is contained in:
Eugene Yokota 2018-04-09 00:11:17 -04:00
parent 4d7149a7f3
commit 8ed796fb25
1 changed files with 3 additions and 1 deletions

View File

@ -41,7 +41,9 @@ final class Console(compiler: AnalyzingCompiler) {
implicit log: Logger): Try[Unit] = {
def console0() =
compiler.console(classpath, options, initialCommands, cleanupCommands, log)(loader, bindings)
JLine.withJLine(Run.executeTrapExit(console0, log))
JLine.usingTerminal { _ =>
Run.executeTrapExit(console0, log)
}
}
}