Skip to content

Commit eec3d3e

Browse files
authored
Fix quoting bug (#6228)
The server was not expecting paths to be quoted, but we were doing so on the client. I've also added a trace-level print of the actual arguments we will use to start the server, which helped me figure this out.
1 parent ea7aa46 commit eec3d3e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/lsptoolshost/roslynLanguageServer.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ export class RoslynLanguageServer {
527527
}
528528

529529
for (const extensionPath of this.additionalExtensionPaths) {
530-
args.push('--extension', `"${extensionPath}"`);
530+
args.push('--extension', extensionPath);
531531
}
532532

533533
// Get the brokered service pipe name from C# Dev Kit (if installed).
@@ -581,9 +581,18 @@ export class RoslynLanguageServer {
581581
if (serverPath.endsWith('.dll')) {
582582
// If we were given a path to a dll, launch that via dotnet.
583583
const argsWithPath = [serverPath].concat(args);
584+
585+
if (logLevel && [Trace.Messages, Trace.Verbose].includes(this.GetTraceLevel(logLevel))) {
586+
_channel.appendLine(`Server arguments ${argsWithPath.join(' ')}`);
587+
}
588+
584589
childProcess = cp.spawn(dotnetExecutablePath, argsWithPath, cpOptions);
585590
} else {
586591
// Otherwise assume we were given a path to an executable.
592+
if (logLevel && [Trace.Messages, Trace.Verbose].includes(this.GetTraceLevel(logLevel))) {
593+
_channel.appendLine(`Server arguments ${args.join(' ')}`);
594+
}
595+
587596
childProcess = cp.spawn(serverPath, args, cpOptions);
588597
}
589598

0 commit comments

Comments
 (0)