Fix CA1839
This commit is contained in:
@@ -735,6 +735,9 @@ dotnet_diagnostic.CA1837.severity = warning
|
||||
# Avoid StringBuilder parameters for P/Invokes.
|
||||
dotnet_diagnostic.CA1838.severity = warning
|
||||
|
||||
# Use Environment.ProcessPath instead of Process.GetCurrentProcess().MainModule.FileName.
|
||||
dotnet_diagnostic.CA1839.severity = warning
|
||||
|
||||
# Use Environment.CurrentManagedThreadId instead of Thread.CurrentThread.ManagedThreadId.
|
||||
dotnet_diagnostic.CA1840.severity = warning
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace OpenRA.WindowsLauncher
|
||||
|
||||
static int RunInnerLauncher(string[] args)
|
||||
{
|
||||
var launcherPath = Process.GetCurrentProcess().MainModule.FileName;
|
||||
var launcherPath = Environment.ProcessPath;
|
||||
var launcherArgs = args.ToList();
|
||||
|
||||
if (!launcherArgs.Any(x => x.StartsWith("Engine.LaunchPath=", StringComparison.Ordinal)))
|
||||
|
||||
Reference in New Issue
Block a user