File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -348,15 +348,6 @@ export async function addPythonProject(
348348 return ;
349349 }
350350
351- if (
352- resource instanceof ProjectPackageRootTreeItem ||
353- resource instanceof ProjectPackage ||
354- resource instanceof ProjectEnvironment
355- ) {
356-
357- await addPythonProject ( undefined , wm , em , pc ) ;
358- }
359-
360351 if ( resource instanceof Uri ) {
361352 const uri = resource as Uri ;
362353 const envManagerId = getDefaultEnvManagerSetting ( wm , uri ) ;
@@ -421,6 +412,9 @@ export async function addPythonProject(
421412 }
422413 await addPythonProjectSetting ( edits ) ;
423414 return projects ;
415+ } else {
416+ // If the context is not a Uri or ProjectItem, rerun function with undefined context
417+ await addPythonProject ( undefined , wm , em , pc ) ;
424418 }
425419}
426420
You can’t perform that action at this time.
0 commit comments