Skip to content

Commit 4dd269e

Browse files
authored
Updated DesktopOsHelper.IsMac to work properly on net10 + macOS 26 (#5541)
* Updated DesktopOsHelper.IsMac to work properly on net10 + macOS 26 * Simplified MacOS detection
1 parent b834065 commit 4dd269e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/client/Microsoft.Identity.Client/PlatformsCommon/Shared/DesktopOsHelper.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ public static bool IsMac()
5252
#elif NETFRAMEWORK
5353
return Environment.OSVersion.Platform == PlatformID.MacOSX;
5454
#elif NET8_0_OR_GREATER
55-
string OSDescription = RuntimeInformation.OSDescription;
56-
return OSDescription.Contains("Darwin", StringComparison.OrdinalIgnoreCase);
55+
return OperatingSystem.IsMacOS();
5756
#else
5857
return RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
5958
#endif

0 commit comments

Comments
 (0)