mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-12-26 15:57:58 +01:00
20 lines
611 B
C#
20 lines
611 B
C#
namespace Spectre.Console.Enrichment;
|
|
|
|
internal sealed class AzurePipelinesEnricher : IProfileEnricher
|
|
{
|
|
public string Name => "AzurePipeline";
|
|
|
|
public bool Enabled(IDictionary<string, string> environmentVariables)
|
|
{
|
|
environmentVariables.TryGetValue("TF_BUILD", out var environmentValue);
|
|
return !string.IsNullOrWhiteSpace(environmentValue);
|
|
}
|
|
|
|
public void Enrich(Profile profile)
|
|
{
|
|
profile.Capabilities.Ansi = true;
|
|
profile.Capabilities.Legacy = false;
|
|
profile.Capabilities.Interactive = false;
|
|
profile.Capabilities.Links = false;
|
|
}
|
|
} |