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
parent 952546f413
commit 21e5f2dead
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 =>