Skip to content

Commit 9974c7d

Browse files
committed
Fix bug where artificial pipeline was erroneously run
The previous logic could accidentally set the boolean flag to `true`, causing the pipeline to be run when it was not necessary.
1 parent 95715ed commit 9974c7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,12 @@ internal void OnPowerShellIdle(CancellationToken idleCancellationToken)
12611261

12621262
// If we're executing a PowerShell task, we don't need to run an extra pipeline
12631263
// later for events.
1264-
runPipelineForEventProcessing = task is not ISynchronousPowerShellTask;
1264+
if (task is ISynchronousPowerShellTask)
1265+
{
1266+
// We don't ever want to set this to true here, just skip if it had
1267+
// previously been set true.
1268+
runPipelineForEventProcessing = false;
1269+
}
12651270
ExecuteTaskSynchronously(task, cancellationScope.CancellationToken);
12661271
}
12671272
}

0 commit comments

Comments
 (0)