Skip to content

Commit 4dabab9

Browse files
committed
expose more ncrunch stuff
1 parent 700d3cf commit 4dabab9

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/DiffEngine/ContinuousTestingDetector.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ static ContinuousTestingDetector()
1313
return;
1414
}
1515

16-
if (Environment.GetEnvironmentVariable("NCRUNCH") != null &&
17-
Environment.GetEnvironmentVariable("NCrunch.IsHighPriority") != "1")
16+
if (IsNCrunch && !IsNCrunchExplicitRun)
1817
{
1918
Detected = true;
2019
}
2120
}
2221

22+
public static bool IsNCrunchExplicitRun { get; } = Environment.GetEnvironmentVariable("NCrunch.IsHighPriority") == "1";
2323
public static bool Detected { get; set; }
24+
public static bool IsNCrunch { get; } = Environment.GetEnvironmentVariable("NCRUNCH") != null;
25+
public static string? NCrunchOriginalProject { get; } = Environment.GetEnvironmentVariable("NCrunch.OriginalProjectPath");
2426
}

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project>
33
<PropertyGroup>
44
<NoWarn>CS1591;CS0649</NoWarn>
5-
<Version>10.4.1</Version>
5+
<Version>10.4.2</Version>
66
<AssemblyVersion>1.0.0</AssemblyVersion>
77
<PackageTags>Testing, Snapshot, Diff, Compare</PackageTags>
88
<Description>Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.</Description>

0 commit comments

Comments
 (0)