Skip to content

Commit 3f9ca15

Browse files
authored
Fix cpptools-wordexp (#13468)
1 parent c617c38 commit 3f9ca15

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Extension/src/common.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,10 @@ function extractArgs(argsString: string): string[] {
10681068
return result;
10691069
} else {
10701070
try {
1071-
const wordexpResult: any = child_process.execFileSync(getExtensionFilePath("bin/cpptools-wordexp"), [argsString], { shell: false });
1071+
const executablePath: string = getExtensionFilePath("bin/cpptools-wordexp");
1072+
const executableDir: string = path.dirname(executablePath);
1073+
process.chdir(executableDir);
1074+
const wordexpResult: any = child_process.execFileSync(executablePath, [argsString], { shell: false });
10721075
if (wordexpResult === undefined) {
10731076
return [];
10741077
}

0 commit comments

Comments
 (0)