Skip to content

Markup Not Working in Azure Pipelines #1666

@elzik

Description

@elzik

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

  1. Create a simple .NET console application and reference Spectre.Console
  2. Execute this single line in the console application:
AnsiConsole.MarkupLine("[green]This should be green but isn't[/]");
  1. 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.

Screenshots
image


Please upvote 👍 this issue if you are interested in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done 🚀

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions