invoke-psake fails under environments which dont support colored consoles #48

Closed
jeffreyabecker opened this Issue Sep 18, 2012 · 4 comments

Comments

Projects
None yet
3 participants
Contributor

jeffreyabecker commented Sep 18, 2012

When invoking psake from a C# host, colored consoles are not supported. Write-ColoredOutput fails to check for ($Host.UI.RawUI.ForegroundColor -ne $null) before setting the ForegroundColor.

A pull request fixing this issue will be forthcoming.

damianh added the UpForGrabs label Mar 31, 2014

Owner

damianh commented Mar 31, 2014

Will accept a PR for this.

Is this already fixed? Sat down to look at it and see this code:

    if (($Host.UI -ne $null) -and ($Host.UI.RawUI -ne $null) -and ($Host.UI.RawUI.ForegroundColor -ne $null)) {
        $previousColor = $Host.UI.RawUI.ForegroundColor
        $Host.UI.RawUI.ForegroundColor = $foregroundcolor
    }
Contributor

jeffreyabecker commented May 10, 2014

iirc I submitted one a while ago github says I dont have any pending PR's

On Fri, May 9, 2014 at 9:36 PM, George Mauer notifications@github.comwrote:

Is this already fixed? Sat down to look at it and see this code:

if (($Host.UI -ne $null) -and ($Host.UI.RawUI -ne $null) -and ($Host.UI.RawUI.ForegroundColor -ne $null)) {
    $previousColor = $Host.UI.RawUI.ForegroundColor
    $Host.UI.RawUI.ForegroundColor = $foregroundcolor
}


Reply to this email directly or view it on GitHubhttps://github.com/psake/psake/issues/48#issuecomment-42728093
.

This needs to get closed. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment