Skip to content

Commit 22f08ae

Browse files
authored
Add fix to support project root item in project getter (#298)
1 parent 5179dbd commit 22f08ae

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
@@ -348,6 +348,10 @@ export async function addPythonProject(
348348
return;
349349
}
350350

351+
if (resource instanceof ProjectPackageRootTreeItem || resource instanceof ProjectPackage) {
352+
await addPythonProject(undefined, wm, em, pc);
353+
}
354+
351355
if (resource instanceof Uri) {
352356
const uri = resource as Uri;
353357
const envManagerId = getDefaultEnvManagerSetting(wm, uri);

0 commit comments

Comments
 (0)