Skip to content

Commit ab65805

Browse files
committed
Update BuildServerDetector.cs
1 parent 158f9a6 commit ab65805

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/DiffEngine/BuildServerDetector.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ static BuildServerDetector()
4343
// https://www.appveyor.com/docs/environment-variables/
4444
IsAppVeyor = variables.Contains("APPVEYOR");
4545

46+
IsWsl = variables.Contains("WSLENV");
47+
4648
// AzureDevops
4749
// https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#agent-variables
4850
// Variable name is 'Agent.Id' to detect if this is a Azure Pipelines agent.
@@ -59,6 +61,7 @@ static BuildServerDetector()
5961
IsMyGet ||
6062
IsGoDc ||
6163
IsDocker ||
64+
IsWsl ||
6265
IsAppVeyor;
6366
}
6467

@@ -73,6 +76,8 @@ static bool ValueEquals(IDictionary variables, string key, string value)
7376
return string.Equals((string)variable, value, StringComparison.OrdinalIgnoreCase);
7477
}
7578

79+
public static bool IsWsl { get; }
80+
7681
public static bool IsAppVeyor { get; }
7782

7883
public static bool IsTravis { get; }

0 commit comments

Comments
 (0)