diff --git a/framework/src/Volo.Abp.Core/System/Runtime/OSPlatformProvider.cs b/framework/src/Volo.Abp.Core/System/Runtime/OSPlatformProvider.cs index d2b05aac60..89b57acaab 100644 --- a/framework/src/Volo.Abp.Core/System/Runtime/OSPlatformProvider.cs +++ b/framework/src/Volo.Abp.Core/System/Runtime/OSPlatformProvider.cs @@ -5,17 +5,11 @@ namespace System.Runtime { public class OSPlatformProvider : IOSPlatformProvider, ITransientDependency { - public OSPlatform GetCurrentOSPlatform() + public virtual OSPlatform GetCurrentOSPlatform() { if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { - //MAC - return OSPlatform.OSX; - } - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - return OSPlatform.Linux; + return OSPlatform.OSX; //MAC } if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) @@ -23,7 +17,7 @@ namespace System.Runtime return OSPlatform.Windows; } - throw new Exception("Cannot determine operating system!"); + return OSPlatform.Linux; } } }