Skip to content

Error message doesn't respect -nocolor option #1816

@BruceForstall

Description

@BruceForstall

This error message:

Skipping -html because XSL-T is not supported on .NET Core 1.x

does not respect the -nocolor option. (That is, it emits color codes unconditionally, which show up as garbage in text log files.)

Looks like this code:

        static void Handler_XslTransform(string key, string resourceName, XElement xml, string outputFileName)
        {
#if NETCOREAPP1_0
            ConsoleHelper.SetForegroundColor(ConsoleColor.Yellow);
            Console.WriteLine($"Skipping -{key} because XSL-T is not supported on .NET Core 1.x");
            ConsoleHelper.ResetColor();
#else

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA fault in an existing featureConsole Runnerxunit.v3.runner.consolehelp wantedA community-provided PR would be welcomed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions