filter data-workspace projects by ext (#14354)

* add filtering by project extension

* Fix tests

* addressing comments

* convert to lowercase
This commit is contained in:
Kim Santiago
2021-02-22 13:21:25 -08:00
committed by GitHub
parent f62889002d
commit 551eb76a42
7 changed files with 17 additions and 9 deletions

View File

@@ -560,7 +560,7 @@ export class ProjectsController {
if ((<IProjectReferenceSettings>settings).projectName !== undefined) {
// get project path and guid
const projectReferenceSettings = settings as IProjectReferenceSettings;
const workspaceProjects = await utils.getSqlProjectsInWorkspace();
const workspaceProjects = utils.getSqlProjectsInWorkspace();
const referencedProject = await Project.openProject(workspaceProjects.filter(p => path.parse(p.fsPath).name === projectReferenceSettings.projectName)[0].fsPath);
const relativePath = path.relative(project.projectFolderPath, referencedProject?.projectFilePath!);
projectReferenceSettings.projectRelativePath = vscode.Uri.file(relativePath);