Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


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

jeffreyabecker opened this Issue · 4 comments

3 participants


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 damianh added the UpForGrabs label

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

This needs to get closed. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.