File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -91,16 +91,19 @@ export class AutoFindProjects implements PythonProjectCreator {
9191
9292 traceInfo ( `Found ${ filtered . length } new potential projects that aren't already registered` ) ;
9393
94- const projects = await pickProjects ( filtered ) ;
95- if ( ! projects || projects . length === 0 ) {
94+ const projectUris = await pickProjects ( filtered ) ;
95+ if ( ! projectUris || projectUris . length === 0 ) {
9696 // User cancelled the selection.
9797 traceInfo ( 'User cancelled project selection.' ) ;
9898 return ;
9999 }
100100
101- return projects . map ( ( uri ) => ( {
101+ const projects = projectUris . map ( ( uri ) => ( {
102102 name : path . basename ( uri . fsPath ) ,
103103 uri,
104- } ) ) ;
104+ } ) ) as PythonProject [ ] ;
105+ // Add the projects to the project manager
106+ this . pm . add ( projects ) ;
107+ return projects ;
105108 }
106109}
Original file line number Diff line number Diff line change @@ -88,10 +88,13 @@ export class ExistingProjects implements PythonProjectCreator {
8888 }
8989 return ;
9090 } else {
91- return resultsInWorkspace . map ( ( uri ) => ( {
91+ const projects = resultsInWorkspace . map ( ( uri ) => ( {
9292 name : path . basename ( uri . fsPath ) ,
9393 uri,
9494 } ) ) as PythonProject [ ] ;
95+ // Add the projects to the project manager
96+ this . pm . add ( projects ) ;
97+ return projects ;
9598 }
9699 }
97100}
You can’t perform that action at this time.
0 commit comments