mirror of
https://github.com/sbt/sbt.git
synced 2026-10-06 10:03:56 +02:00
Make ConsoleReader creation lazy
I noticed while debugging a jline 2 issue that the SimpleReader was creating a ConsoleReader on startup even if it was never used.
This commit is contained in:
@@ -316,7 +316,7 @@ class SimpleReader private[sbt] (
|
||||
) extends JLine {
|
||||
def this(historyPath: Option[File], handleCONT: Boolean, injectThreadSleep: Boolean) =
|
||||
this(historyPath, handleCONT, Terminal.console)
|
||||
protected[this] val reader: ConsoleReader =
|
||||
protected[this] lazy val reader: ConsoleReader =
|
||||
LineReader.createJLine2Reader(historyPath, terminal)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user