Skip to content

Commit 47e194c

Browse files
committed
fix UI issue
1 parent 1eb7b67 commit 47e194c

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

src/managers/builtin/venvManager.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -336,14 +336,15 @@ export class VenvManager implements EnvironmentManager {
336336
environment: env,
337337
}));
338338

339-
this.collection = (await findVirtualEnvironments(
340-
hardRefresh,
341-
this.nativeFinder,
342-
this.api,
343-
this.log,
344-
this,
345-
scope ? [scope] : undefined,
346-
)) ?? [];
339+
this.collection =
340+
(await findVirtualEnvironments(
341+
hardRefresh,
342+
this.nativeFinder,
343+
this.api,
344+
this.log,
345+
this,
346+
scope ? [scope] : undefined,
347+
)) ?? [];
347348
await this.loadEnvMap();
348349

349350
const added = this.collection.map((env) => ({ environment: env, kind: EnvironmentChangeKind.add }));
@@ -500,10 +501,6 @@ export class VenvManager implements EnvironmentManager {
500501
);
501502
if (resolved) {
502503
if (resolved.envId.managerId === `${PYTHON_EXTENSION_ID}:venv`) {
503-
// This is just like finding a new environment or creating a new one.
504-
// Add it to collection, and trigger the added event.
505-
this.addEnvironment(resolved, true);
506-
507504
// We should only return the resolved env if it is a venv.
508505
// Fall through an return undefined if it is not a venv
509506
return resolved;

0 commit comments

Comments
 (0)