fix: propagate `InterruptedException` from JLine.readLine

Motivation:
Cannot exit from InteractionService.readLine

Modification:
Remove try/catch of InterruptedException mapped to None in JLine.readLine
This commit is contained in:
tpetillot 2022-01-26 16:19:15 +01:00 committed by Eugene Yokota
parent ca0fd3db8c
commit 4f9fe2af64
1 changed files with 1 additions and 7 deletions

View File

@ -178,13 +178,7 @@ abstract class JLine extends LineReader {
protected[this] lazy val in: InputStream = Terminal.wrappedSystemIn
override def readLine(prompt: String, mask: Option[Char] = None): Option[String] =
try {
unsynchronizedReadLine(prompt, mask)
} catch {
case _: InterruptedException =>
// println("readLine: InterruptedException")
Option("")
}
unsynchronizedReadLine(prompt, mask)
private[this] def unsynchronizedReadLine(prompt: String, mask: Option[Char]): Option[String] =
readLineWithHistory(prompt, mask) map { x =>