Skip to content

Commit 7b3348a

Browse files
authored
trigger manager refresh on new project creation (#736)
fixes #737
1 parent cd9df6b commit 7b3348a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)