aldrichtr / infraspective

Infrastructure testing using pester
MIT License
18 stars 0 forks source link

`Write-Result` does not properly handle console color names #63

Closed aldrichtr closed 2 years ago

aldrichtr commented 2 years ago

on line 86 it checks the color against the System.ConsoleColor enum, but then it uses PSStyle to actually set the color.

$color = $map.$Type.Color
if ([system.enum]::GetNames([System.ConsoleColor]) -contains $color) {
    if ($Type -like 'End') {
        # treat the end "cookie special"
        $pre_fmt = "$($PSStyle.Foreground.$color)[$reset"
        $pst_fmt = "$($PSStyle.Foreground.$color)]$reset"
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had any activity in the last 60 days. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.