🐛 fix build

This commit is contained in:
Aigio Liu
2023-05-29 14:09:05 +08:00
parent df84ad4271
commit 01d35cecbd
2 changed files with 6 additions and 4 deletions
@@ -10,9 +10,9 @@ partial interface IPlatformService
return identity.IsSystem || new WindowsPrincipal(identity)
.IsInRole(WindowsBuiltInRole.Administrator);
#elif MACCATALYST || MACOS || LINUX || IOS || ANDROID
return Interop.Libc.GetEUID() == 0;
return Interop.Libc.GetEUID() == 0;
#else
throw new PlatformNotSupportedException();
throw new PlatformNotSupportedException();
#endif
});
@@ -2,12 +2,14 @@
using dotnetCampus.Ipc.CompilerServices.GeneratedProxies;
using System.CommandLine;
using System.CommandLine.NamingConventionBinder;
#endif
// ReSharper disable once CheckNamespace
namespace BD.WTTS;
partial class Startup // 自定义控制台命令参数
{
#if (WINDOWS || MACCATALYST || MACOS || LINUX) && !(IOS || ANDROID)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void ConfigureCommands(RootCommand rootCommand)
{
@@ -446,6 +448,7 @@ partial class Startup // 自定义控制台命令参数
};
rootCommand.AddCommand(types);
}
#endif
public enum CommandExitCode
{
@@ -501,5 +504,4 @@ partial class Startup // 自定义控制台命令参数
#endregion
}
}
#endif
}