Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Commit c4e3274

Browse files
authored
trigger manager refresh on new project creation (#736)
fixes microsoft/vscode-python-environments#737
1 parent b81b74f commit c4e3274

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/features/envCommands.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ export async function addPythonProjectCommand(
418418
};
419419
}
420420
await existingProjectsCreator.create(options);
421+
// trigger refresh to populate environments within the new project
422+
await Promise.all(em.managers.map((m) => m.refresh(options?.rootUri)));
421423
return;
422424
} catch (ex) {
423425
if (ex === QuickInputButtons.Back) {
@@ -450,6 +452,8 @@ export async function addPythonProjectCommand(
450452

451453
try {
452454
await creator.create(options);
455+
// trigger refresh to populate environments within the new project
456+
await Promise.all(em.managers.map((m) => m.refresh(options?.rootUri)));
453457
} catch (ex) {
454458
if (ex === QuickInputButtons.Back) {
455459
return addPythonProjectCommand(resource, wm, em, pc);

0 commit comments

Comments
 (0)