Skip to content

Commit cf8770d

Browse files
committed
trigger manager refresh on new project creation
1 parent cd9df6b commit cf8770d

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)