Skip to content
Open
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
21 changes: 9 additions & 12 deletions src/managers/builtin/venvManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,15 @@ export class VenvManager implements EnvironmentManager {
environment: env,
}));

this.collection = (await findVirtualEnvironments(
hardRefresh,
this.nativeFinder,
this.api,
this.log,
this,
scope ? [scope] : undefined,
)) ?? [];
this.collection =
(await findVirtualEnvironments(
hardRefresh,
this.nativeFinder,
this.api,
this.log,
this,
scope ? [scope] : undefined,
)) ?? [];
await this.loadEnvMap();

const added = this.collection.map((env) => ({ environment: env, kind: EnvironmentChangeKind.add }));
Expand Down Expand Up @@ -500,10 +501,6 @@ export class VenvManager implements EnvironmentManager {
);
if (resolved) {
if (resolved.envId.managerId === `${PYTHON_EXTENSION_ID}:venv`) {
// This is just like finding a new environment or creating a new one.
// Add it to collection, and trigger the added event.
this.addEnvironment(resolved, true);

// We should only return the resolved env if it is a venv.
// Fall through an return undefined if it is not a venv
return resolved;
Expand Down
Loading