Skip to content

Commit 613724d

Browse files
committed
Add logging of PATH to investigate ATA issues reported in microsoft#24961
1 parent ed16aff commit 613724d

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

extensions/typescript/src/typescriptServiceClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
543543
}
544544
}
545545

546-
electron.fork(modulePath, args, options, (err: any, childProcess: cp.ChildProcess) => {
546+
electron.fork(modulePath, args, options, this.logger, (err: any, childProcess: cp.ChildProcess) => {
547547
if (err) {
548548
this.lastError = err;
549549
this.error('Starting TSServer failed with error.', err);

extensions/typescript/src/utils/electron.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import path = require('path');
99
import os = require('os');
1010
import net = require('net');
1111
import cp = require('child_process');
12+
import Logger from './logger';
1213

1314
export interface IForkOptions {
1415
cwd?: string;
@@ -60,7 +61,8 @@ export function fork(
6061
modulePath: string,
6162
args: string[],
6263
options: IForkOptions,
63-
callback: (error: any, cp: cp.ChildProcess | null) => void
64+
logger: Logger,
65+
callback: (error: any, cp: cp.ChildProcess | null) => void,
6466
): void {
6567

6668
var callbackCalled = false;
@@ -86,7 +88,6 @@ export function fork(
8688

8789

8890
const newEnv = generatePatchedEnv(process.env, stdInPipeName, stdOutPipeName, stdErrPipeName);
89-
9091
var childProcess: cp.ChildProcess;
9192

9293
// Begin listening to stderr pipe
@@ -123,6 +124,8 @@ export function fork(
123124
};
124125

125126
// Create the process
127+
logger.info('Forking TSServer', `PATH: ${newEnv['PATH']}`);
128+
126129
const bootstrapperPath = path.join(__dirname, 'electronForkStart');
127130
childProcess = cp.fork(bootstrapperPath, [modulePath].concat(args), <any>{
128131
silent: true,

0 commit comments

Comments
 (0)