Merge pull request #6803 from tpetillot/issue-6784-propagate-interrupted-exception-read-line

fix: propagate `InterruptedException` from JLine.readLine
This commit is contained in:
eugene yokota 2022-01-31 21:39:09 -05:00 committed by GitHub
commit 50c3cf1082
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 =>