mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix codefactor if part 1 (#19266)
This commit is contained in:
@@ -1146,7 +1146,11 @@ namespace System.Management.Automation
|
||||
{
|
||||
lock (_sync)
|
||||
{
|
||||
if (_stopped) return;
|
||||
if (_stopped)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_stopped = true;
|
||||
}
|
||||
|
||||
@@ -1651,9 +1655,15 @@ namespace System.Management.Automation
|
||||
|
||||
// we incrementing refCount on the same thread and before running any processing
|
||||
// so it's safe to do it without Interlocked.
|
||||
if (process.StartInfo.RedirectStandardOutput) { _refCount++; }
|
||||
if (process.StartInfo.RedirectStandardOutput)
|
||||
{
|
||||
_refCount++;
|
||||
}
|
||||
|
||||
if (process.StartInfo.RedirectStandardError) { _refCount++; }
|
||||
if (process.StartInfo.RedirectStandardError)
|
||||
{
|
||||
_refCount++;
|
||||
}
|
||||
|
||||
// once we have _refCount, we can start processing
|
||||
if (process.StartInfo.RedirectStandardOutput)
|
||||
|
||||
Reference in New Issue
Block a user