Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH2908: Future proof .NET [Core] detection #2909

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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