Suppress jline warning

This commit is contained in:
Karlatemp 2020-11-19 13:06:23 +08:00
parent 77b38a9ba3
commit 1c7ebe2413
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

View File

@ -103,12 +103,11 @@ val lineReader: LineReader by lazy {
val terminal: Terminal = run {
if (ConsoleTerminalSettings.noConsole) return@run NoConsole
val dumb = System.getProperty("java.class.path")
.contains("idea_rt.jar") || System.getProperty("mirai.idea") !== null || System.getenv("mirai.idea") !== null
runCatching {
TerminalBuilder.builder()
.dumb(dumb)
.name("Mirai Console")
.system(true)
.jansi(true)
.dumb(true)
.paused(true)
.build()
.let { terminal ->
@ -136,15 +135,6 @@ val terminal: Terminal = run {
terminal.resume()
terminal
}
}.recoverCatching {
TerminalBuilder.builder()
.jansi(true)
.build()
}.recoverCatching {
TerminalBuilder.builder()
.system(true)
.build()
}.getOrThrow()
}
private object ConsoleFrontEndDescImpl : MiraiConsoleFrontEndDescription {