You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a console app built using Spectre.Console is run from an Azure pipeline PowerShell task, the output does not honour the colours set.
To Reproduce
Create a simple .NET console application and reference Spectre.Console
Execute this single line in the console application:
AnsiConsole.MarkupLine("[green]This should be green but isn't[/]");
Run the console application from a PowerShell@2:
- task: PowerShell@2displayName: 'Test Script'inputs:
targetType: 'inline'script: | Write-Host "`e[32mThis should be green and is`e[0m" test-console-application
Expected behavior
Both lines written to the console should be green. The first is using an ANSI escape code, and the second is using Spectre.Console. However, as seen in the screenshot, only the first line is green.
Screenshots
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered:
Spectre.Console is probably not detecting ANSI support from the environment it runs in. This could happen if stdout is redirected for example. This could be solved by adding an enricher for Azure Pipelines just as we have for other CI-servers such as GitHub Actions.
Information
Describe the bug
When a console app built using Spectre.Console is run from an Azure pipeline PowerShell task, the output does not honour the colours set.
To Reproduce
PowerShell@2
:Expected behavior
Both lines written to the console should be green. The first is using an ANSI escape code, and the second is using Spectre.Console. However, as seen in the screenshot, only the first line is green.
Screenshots
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered: