Skip to content
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
2 changes: 1 addition & 1 deletion .globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ dotnet_diagnostic.CA1838.severity = silent

# CA1839: Use 'Environment.ProcessPath'
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1839
dotnet_diagnostic.CA1839.severity = suggestion
dotnet_diagnostic.CA1839.severity = warning

# CA1840: Use 'Environment.CurrentManagedThreadId'
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1840
Expand Down
2 changes: 1 addition & 1 deletion test/tools/TestExe/TestExe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private static void CreateChildProcess(string[] args)
for (uint i = 0; i < num; i++)
{
Process child = new Process();
child.StartInfo.FileName = Process.GetCurrentProcess().MainModule.FileName;
child.StartInfo.FileName = Environment.ProcessPath;
child.StartInfo.Arguments = "-createchildprocess";
child.Start();
}
Expand Down
2 changes: 1 addition & 1 deletion test/xUnit/csharp/test_FileSystemProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void TestMode()
{
directoryObject = new DirectoryInfo(System.Environment.CurrentDirectory);
fileObject = new FileInfo(System.Reflection.Assembly.GetEntryAssembly().Location);
executableObject = new FileInfo(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
executableObject = new FileInfo(Environment.ProcessPath);
}

Assert.Equal("d----", FileSystemProvider.Mode(PSObject.AsPSObject(directoryObject)).Replace("r", "-"));
Expand Down