Skip to content

Commit 0eb607a

Browse files
author
Kartik Raj
committed
Fix combining iterators
1 parent 4f32c50 commit 0eb607a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/client/pythonEnvironments/base/locators.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ export function combineIterators<I>(iterators: IPythonEnvsIterator<I>[]): IPytho
3434
const disposable = event!((e: PythonEnvUpdatedEvent<I> | ProgressNotificationEvent) => {
3535
// NOSONAR
3636
if (isProgressEvent(e)) {
37-
if (e.stage !== ProgressReportStage.discoveryFinished) {
38-
return;
39-
}
40-
numActive -= 1;
41-
if (numActive === 0) {
42-
// All the sub-events are done so we're done.
43-
handleEvent({ stage: ProgressReportStage.discoveryFinished });
37+
if (e.stage === ProgressReportStage.discoveryFinished) {
38+
numActive -= 1;
39+
if (numActive === 0) {
40+
// All the sub-events are done so we're done.
41+
handleEvent({ stage: ProgressReportStage.discoveryFinished });
42+
}
43+
} else {
44+
handleEvent({ stage: e.stage });
4445
}
4546
} else {
4647
handleEvent(e);

0 commit comments

Comments
 (0)