Skip to content

Commit

Permalink
Tweak .NET [Core] detection
Browse files Browse the repository at this point in the history
  • Loading branch information
gitfool committed Oct 20, 2020
1 parent e32f10f commit 7b4a2c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Cake.Core/Polyfill/EnvironmentHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public static bool IsCoreClr()
#if NETCORE
if (_isCoreClr == null)
{
_isCoreClr = RuntimeInformation.FrameworkDescription.StartsWith(".NET Core")
|| RuntimeInformation.FrameworkDescription.StartsWith(".NET 5");
_isCoreClr = Environment.Version.Major >= 5
|| RuntimeInformation.FrameworkDescription.StartsWith(".NET Core");
}
return _isCoreClr.Value;
#else
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Core/Polyfill/Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public enum Runtime
Clr,

/// <summary>
/// .NET Core / .NET 5.
/// .NET Core or .NET 5+.
/// </summary>
CoreClr
}
Expand Down

0 comments on commit 7b4a2c8

Please sign in to comment.