Skip to content

Commit

Permalink
[MNG-6380] Make sure we forward the color enabled mode down to Jansi
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Jan 21, 2021
1 parent 09e8802 commit 660272e
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -112,6 +112,17 @@ public static void setColorEnabled( boolean flag )
{
AnsiConsole.out().setMode( flag ? AnsiMode.Force : AnsiMode.Strip );
Ansi.setEnabled( flag );
System.setProperty( AnsiConsole.JANSI_MODE,
flag ? AnsiConsole.JANSI_MODE_FORCE : AnsiConsole.JANSI_MODE_STRIP );
boolean installed = AnsiConsole.isInstalled();
while ( AnsiConsole.isInstalled() )
{
AnsiConsole.systemUninstall();
}
if ( installed )
{
AnsiConsole.systemInstall();
}
}
}

Expand Down

0 comments on commit 660272e

Please sign in to comment.