Pass --useNodeIpc

This commit is contained in:
Matt Bierner 2021-10-18 15:45:55 -07:00
parent 2feca6b83a
commit 4be281c494
No known key found for this signature in database
GPG key ID: 099C331567E11888

View file

@ -264,10 +264,15 @@ export class ElectronServiceProcessFactory implements TsServerProcessFactory {
tsServerPath = versionManager.currentVersion.tsServerPath;
}
// TODO: use 4.6 instead
// TODO: use 4.6+ instead
const useIpc = version.apiVersion?.gte(API.v440);
const childProcess = child_process.fork(tsServerPath, args, {
const runtimeArgs = [...args];
if (useIpc) {
runtimeArgs.push('--useNodeIpc');
}
const childProcess = child_process.fork(tsServerPath, runtimeArgs, {
silent: true,
cwd: undefined,
env: generatePatchedEnv(process.env, tsServerPath),