From 57338f1c9d1d9b0d4d24e6da089d73c82dd03ce1 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson Date: Mon, 7 Apr 2025 12:22:56 -0700 Subject: [PATCH 1/2] Fix cpptools-wordexp --- Extension/src/common.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 18fba33c0..0310573d5 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -1068,7 +1068,10 @@ function extractArgs(argsString: string): string[] { return result; } else { try { - const wordexpResult: any = child_process.execFileSync(getExtensionFilePath("bin/cpptools-wordexp"), [argsString], { shell: false }); + const executablePath: string = getExtensionFilePath("bin/cpptools-wordexp"); + const executableDir = path.dirname(executablePath); + process.chdir(executableDir); + const wordexpResult: any = child_process.execFileSync(executablePath, [argsString], { shell: false }); if (wordexpResult === undefined) { return []; } From 73e03b51e6ea94a82145e5114963110e281c9f7a Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson Date: Mon, 7 Apr 2025 12:27:41 -0700 Subject: [PATCH 2/2] Lint --- Extension/src/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 0310573d5..fba6c3ac3 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -1069,7 +1069,7 @@ function extractArgs(argsString: string): string[] { } else { try { const executablePath: string = getExtensionFilePath("bin/cpptools-wordexp"); - const executableDir = path.dirname(executablePath); + const executableDir: string = path.dirname(executablePath); process.chdir(executableDir); const wordexpResult: any = child_process.execFileSync(executablePath, [argsString], { shell: false }); if (wordexpResult === undefined) {