File tree 2 files changed +21
-0
lines changed
src/Spectre.Console/Enrichment
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ namespace Spectre . Console . Enrichment ;
2
+
3
+ internal sealed class AzurePipelinesEnricher : IProfileEnricher
4
+ {
5
+ public string Name => "AzurePipeline" ;
6
+
7
+ public bool Enabled ( IDictionary < string , string > environmentVariables )
8
+ {
9
+ environmentVariables . TryGetValue ( "TF_BUILD" , out var environmentValue ) ;
10
+ return ! string . IsNullOrWhiteSpace ( environmentValue ) ;
11
+ }
12
+
13
+ public void Enrich ( Profile profile )
14
+ {
15
+ profile . Capabilities . Ansi = true ;
16
+ profile . Capabilities . Legacy = false ;
17
+ profile . Capabilities . Interactive = false ;
18
+ profile . Capabilities . Links = false ;
19
+ }
20
+ }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ internal static class ProfileEnricher
5
5
private static readonly List < IProfileEnricher > _defaultEnrichers = new List < IProfileEnricher >
6
6
{
7
7
new AppVeyorEnricher ( ) ,
8
+ new AzurePipelinesEnricher ( ) ,
8
9
new BambooEnricher ( ) ,
9
10
new BitbucketEnricher ( ) ,
10
11
new BitriseEnricher ( ) ,
You can’t perform that action at this time.
0 commit comments