@@ -16,6 +16,7 @@ import { IpcMainEvent } from 'electron';
16
16
import { validatedIpcMain } from 'vs/base/parts/ipc/electron-main/ipcMain' ;
17
17
import { DisposableStore , toDisposable } from 'vs/base/common/lifecycle' ;
18
18
import { Emitter } from 'vs/base/common/event' ;
19
+ import { deepClone } from 'vs/base/common/objects' ;
19
20
20
21
export class ElectronPtyHostStarter implements IPtyHostStarter {
21
22
@@ -54,8 +55,8 @@ export class ElectronPtyHostStarter implements IPtyHostStarter {
54
55
this . utilityProcess . start ( {
55
56
type : 'ptyHost' ,
56
57
entryPoint : 'vs/platform/terminal/node/ptyHostMain' ,
57
- payload : this . _createPtyHostConfiguration ( lastPtyId ) ,
58
- execArgv
58
+ execArgv ,
59
+ env : this . _createPtyHostConfiguration ( lastPtyId )
59
60
} ) ;
60
61
61
62
const port = this . utilityProcess . connect ( ) ;
@@ -78,13 +79,14 @@ export class ElectronPtyHostStarter implements IPtyHostStarter {
78
79
79
80
private _createPtyHostConfiguration ( lastPtyId : number ) {
80
81
return {
81
- VSCODE_LAST_PTY_ID : lastPtyId ,
82
+ ...deepClone ( process . env ) ,
83
+ VSCODE_LAST_PTY_ID : String ( lastPtyId ) ,
82
84
VSCODE_AMD_ENTRYPOINT : 'vs/platform/terminal/node/ptyHostMain' ,
83
85
VSCODE_PIPE_LOGGING : 'true' ,
84
86
VSCODE_VERBOSE_LOGGING : 'true' , // transmit console logs from server to client,
85
- VSCODE_RECONNECT_GRACE_TIME : this . _reconnectConstants . graceTime ,
86
- VSCODE_RECONNECT_SHORT_GRACE_TIME : this . _reconnectConstants . shortGraceTime ,
87
- VSCODE_RECONNECT_SCROLLBACK : this . _reconnectConstants . scrollback
87
+ VSCODE_RECONNECT_GRACE_TIME : String ( this . _reconnectConstants . graceTime ) ,
88
+ VSCODE_RECONNECT_SHORT_GRACE_TIME : String ( this . _reconnectConstants . shortGraceTime ) ,
89
+ VSCODE_RECONNECT_SCROLLBACK : String ( this . _reconnectConstants . scrollback )
88
90
} ;
89
91
}
90
92
0 commit comments