Skip to content

Commit 4f64ca7

Browse files
authored
Add quotes around the value of clangd.path (#715)
With `shell: true`, this is needed in case the path contains spaces.
1 parent 0c2d40d commit 4f64ca7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/clangd-context.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ export class ClangdContext implements vscode.Disposable {
6767
return;
6868

6969
const clangd: vscodelc.Executable = {
70-
command: clangdPath,
70+
// Quote the path. With `shell: true`, this is needed
71+
// in case the path contains spaces.
72+
command: `"${clangdPath}"`,
7173
args: await config.get<string[]>('arguments'),
7274
options: {cwd: vscode.workspace.rootPath || process.cwd(), shell: true}
7375
};

0 commit comments

Comments
 (0)