From 14b2c47b36795f3394c93da0d6baddf4c4c61ca2 Mon Sep 17 00:00:00 2001 From: Andreea Isac Date: Fri, 17 May 2024 02:04:47 -0700 Subject: [PATCH 1/2] File system APIs don't recognize ~ in paths and because of this the extension cannot properly interpret cmake file-api jsons to list targets. --- src/drivers/cmakeFileApiDriver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/cmakeFileApiDriver.ts b/src/drivers/cmakeFileApiDriver.ts index 51779080c1..6052d1ca49 100644 --- a/src/drivers/cmakeFileApiDriver.ts +++ b/src/drivers/cmakeFileApiDriver.ts @@ -335,7 +335,7 @@ export class CMakeFileApiDriver extends CMakeDriver { private toolchainWarningProvided: boolean = false; private async updateCodeModel(binaryDir?: string): Promise { - const reply_path = this.getCMakeReplyPath(binaryDir); + const reply_path = this.getCMakeReplyPath(binaryDir).replace('~', process.env.HOME || "."); const indexFile = await loadIndexFile(reply_path); if (indexFile) { this._generatorInformation = indexFile.cmake.generator; From 022b02cb7c43b30ceee34c37d964b78bfa491e8a Mon Sep 17 00:00:00 2001 From: Andreea Isac Date: Fri, 17 May 2024 02:06:44 -0700 Subject: [PATCH 2/2] Fix path typo --- src/drivers/cmakeFileApiDriver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/cmakeFileApiDriver.ts b/src/drivers/cmakeFileApiDriver.ts index 6052d1ca49..e17d455ec7 100644 --- a/src/drivers/cmakeFileApiDriver.ts +++ b/src/drivers/cmakeFileApiDriver.ts @@ -335,7 +335,7 @@ export class CMakeFileApiDriver extends CMakeDriver { private toolchainWarningProvided: boolean = false; private async updateCodeModel(binaryDir?: string): Promise { - const reply_path = this.getCMakeReplyPath(binaryDir).replace('~', process.env.HOME || "."); + const reply_path = this.getCMakeReplyPath(binaryDir).replace('~', process.env.HOME || "./"); const indexFile = await loadIndexFile(reply_path); if (indexFile) { this._generatorInformation = indexFile.cmake.generator;