mirror of https://github.com/sbt/sbt.git
Adjust to Zinc change
This commit is contained in:
parent
d3ffd33e17
commit
ff711f4719
|
|
@ -9,7 +9,7 @@ package sbt
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.nio.channels.ClosedChannelException
|
import java.nio.channels.ClosedChannelException
|
||||||
import sbt.internal.inc.{ AnalyzingCompiler, PlainVirtualFile }
|
import sbt.internal.inc.{ AnalyzingCompiler, MappedFileConverter, PlainVirtualFile }
|
||||||
import sbt.internal.util.{ DeprecatedJLine, Terminal }
|
import sbt.internal.util.{ DeprecatedJLine, Terminal }
|
||||||
import sbt.util.Logger
|
import sbt.util.Logger
|
||||||
import xsbti.compile.{ Compilers, Inputs }
|
import xsbti.compile.{ Compilers, Inputs }
|
||||||
|
|
@ -56,13 +56,14 @@ final class Console(compiler: AnalyzingCompiler) {
|
||||||
terminal: Terminal
|
terminal: Terminal
|
||||||
)(loader: Option[ClassLoader], bindings: Seq[(String, Any)])(implicit log: Logger): Try[Unit] = {
|
)(loader: Option[ClassLoader], bindings: Seq[(String, Any)])(implicit log: Logger): Try[Unit] = {
|
||||||
def console0(): Unit =
|
def console0(): Unit =
|
||||||
try compiler.console(classpath map { x =>
|
try {
|
||||||
PlainVirtualFile(x.toPath)
|
compiler.console(classpath map { x =>
|
||||||
}, options, initialCommands, cleanupCommands, log)(
|
PlainVirtualFile(x.toPath)
|
||||||
loader,
|
}, MappedFileConverter.empty, options, initialCommands, cleanupCommands, log)(
|
||||||
bindings
|
loader,
|
||||||
)
|
bindings
|
||||||
catch { case _: InterruptedException | _: ClosedChannelException => }
|
)
|
||||||
|
} catch { case _: InterruptedException | _: ClosedChannelException => }
|
||||||
val previous = sys.props.get("scala.color").getOrElse("auto")
|
val previous = sys.props.get("scala.color").getOrElse("auto")
|
||||||
try {
|
try {
|
||||||
sys.props("scala.color") = if (terminal.isColorEnabled) "true" else "false"
|
sys.props("scala.color") = if (terminal.isColorEnabled) "true" else "false"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue