mirror of https://github.com/sbt/sbt.git
Catch io errors in (enter|exit)RawMode
In a continuous build with rapid triggers, it's possible for the input thread to be interrupted before it has completed the transition into raw mode. This isn't a big deal because it will be reset when we enter the next build or when we re-enter the shell.
This commit is contained in:
parent
025aff625b
commit
54f8ef8352
|
|
@ -809,11 +809,13 @@ object Terminal {
|
|||
|
||||
override private[sbt] def enterRawMode(): Unit = if (rawMode.compareAndSet(false, true)) {
|
||||
in.setRawMode(true)
|
||||
JLine3.enterRawMode(system)
|
||||
try JLine3.enterRawMode(system)
|
||||
catch { case _: java.io.IOError => }
|
||||
}
|
||||
override private[sbt] def exitRawMode(): Unit = if (rawMode.compareAndSet(true, false)) {
|
||||
in.setRawMode(false)
|
||||
JLine3.exitRawMode(system)
|
||||
try JLine3.exitRawMode(system)
|
||||
catch { case _: java.io.IOError => }
|
||||
}
|
||||
override def isColorEnabled: Boolean =
|
||||
props
|
||||
|
|
|
|||
Loading…
Reference in New Issue