-
-
Notifications
You must be signed in to change notification settings - Fork 597
Closed
Labels
Milestone
Description
Information
- OS: Linux Ubuntu 22.04.5 build agent
- Version: Spectre.Console 0.49.1
- Terminal: Azure pipeline output
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@2
displayName: '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.
Please upvote 👍 this issue if you are interested in it.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done 🚀