mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Suppress jline warning
This commit is contained in:
parent
77b38a9ba3
commit
1c7ebe2413
@ -103,12 +103,11 @@ val lineReader: LineReader by lazy {
|
|||||||
val terminal: Terminal = run {
|
val terminal: Terminal = run {
|
||||||
if (ConsoleTerminalSettings.noConsole) return@run NoConsole
|
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()
|
TerminalBuilder.builder()
|
||||||
.dumb(dumb)
|
.name("Mirai Console")
|
||||||
|
.system(true)
|
||||||
|
.jansi(true)
|
||||||
|
.dumb(true)
|
||||||
.paused(true)
|
.paused(true)
|
||||||
.build()
|
.build()
|
||||||
.let { terminal ->
|
.let { terminal ->
|
||||||
@ -136,15 +135,6 @@ val terminal: Terminal = run {
|
|||||||
terminal.resume()
|
terminal.resume()
|
||||||
terminal
|
terminal
|
||||||
}
|
}
|
||||||
}.recoverCatching {
|
|
||||||
TerminalBuilder.builder()
|
|
||||||
.jansi(true)
|
|
||||||
.build()
|
|
||||||
}.recoverCatching {
|
|
||||||
TerminalBuilder.builder()
|
|
||||||
.system(true)
|
|
||||||
.build()
|
|
||||||
}.getOrThrow()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private object ConsoleFrontEndDescImpl : MiraiConsoleFrontEndDescription {
|
private object ConsoleFrontEndDescImpl : MiraiConsoleFrontEndDescription {
|
||||||
|
Loading…
Reference in New Issue
Block a user