Merge pull request #6870 from mlorbetske/dev/mlorbe/FixConsoleUnboldingOnErrorIssue4850

Fix console unbolding on error Issue #4850
This commit is contained in:
Livar 2017-06-15 09:14:58 -07:00 committed by GitHub
commit 1d8db53f56

View file

@ -8,11 +8,14 @@ namespace Microsoft.DotNet.Cli.Utils
{
public class AnsiConsole
{
private const int Light = 0x08;
private AnsiConsole(TextWriter writer)
{
Writer = writer;
OriginalForegroundColor = Console.ForegroundColor;
_boldRecursion = ((int)OriginalForegroundColor & Light) != 0 ? 1 : 0;
}
private int _boldRecursion;
@ -33,7 +36,6 @@ namespace Microsoft.DotNet.Cli.Utils
private void SetColor(ConsoleColor color)
{
const int Light = 0x08;
int c = (int)color;
Console.ForegroundColor =