Skip to content

Commit

Permalink
Loader: safe ansi initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Jun 22, 2022
1 parent 28876c2 commit a6a1676
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/org/itxtech/mcl/Loader.java
Expand Up @@ -69,7 +69,12 @@ public static void main(String[] args) {
try {
if (!Boolean.getBoolean("mcl.disable-ansi")) {
if (!Boolean.getBoolean("mcl.no-ansi-console-init")) {
AnsiConsole.systemInstall();
try {
AnsiConsole.systemInstall();
} catch (Exception ansiException) {
loader.logger.error("Fail to initialize JAnsi, set env mcl.no-ansi-console-init to true to disable the initialization.");
loader.logger.logException(ansiException);
}
}
Ansi.setEnabled(true);
} else {
Expand Down

0 comments on commit a6a1676

Please sign in to comment.