Merge pull request #6807 from eed3si9n/bport/6803

[1.6.x] fix: propagate `InterruptedException` from JLine.readLine
This commit is contained in:
eugene yokota 2022-01-31 22:11:10 -05:00 committed by GitHub
commit 611b8cf01b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 =>