Skip to content

Commit

Permalink
fix first tip
Browse files Browse the repository at this point in the history
  • Loading branch information
Colerar committed Feb 17, 2022
1 parent e285f06 commit 2ed36a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/kotlin/moe/sdl/tracks/Tracks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ import moe.sdl.tracks.util.osType
import org.fusesource.jansi.AnsiConsole

fun main(args: Array<String>) {
if (tracksPreference.first && osType == OsType.WINDOWS)
if (tracksPreference.first && osType == OsType.WINDOWS) {
echo(
"""
@|bold 检测到您是首次运行本程序, 并且当前运行环境是 Windows|@
@|bold 为了更好的使用体验, 强烈建议您, 不要将本程序运行于默认 cmd / powershell 上|@
@|bold 推荐使用 Windows Terminal 等现代终端, 下载地址: https://aka.ms/terminal|@
""".trimIndent().color
)
tracksPreference.first = false
}
if (tracksPreference.enableColor) AnsiConsole.systemInstall()
System.setProperty(org.slf4j.impl.SimpleLogger.DEFAULT_LOG_LEVEL_KEY, if (debug) "DEBUG" else "ERROR")
try {
Expand All @@ -36,7 +38,6 @@ fun main(args: Array<String>) {
echo(e)
Log.debug(e) { "Stacktrace:" }
}
tracksPreference.first = false
}

class MainCommand : CliktCommand(
Expand Down

0 comments on commit 2ed36a4

Please sign in to comment.