fix: tsserver no longer crashes when log path includes spaces (#212752)

This commit is contained in:
Walker Boyle
2024-05-21 11:01:17 -07:00
committed by GitHub
parent 54d31be669
commit 3bda9ff4f7

View File

@@ -234,7 +234,7 @@ export class TypeScriptServerSpawner {
tsServerLog = { type: 'file', uri: logFilePath };
args.push('--logVerbosity', TsServerLogLevel.toString(configuration.tsServerLogLevel));
args.push('--logFile', logFilePath.fsPath);
args.push('--logFile', `"${logFilePath.fsPath}"`);
}
}
}
@@ -242,7 +242,7 @@ export class TypeScriptServerSpawner {
if (configuration.enableTsServerTracing && !isWeb()) {
tsServerTraceDirectory = this._logDirectoryProvider.getNewLogDirectory();
if (tsServerTraceDirectory) {
args.push('--traceDirectory', tsServerTraceDirectory.fsPath);
args.push('--traceDirectory', `"${tsServerTraceDirectory.fsPath}"`);
}
}