Pass env via extension api when creating terminal

This commit is contained in:
Ramya Achutha Rao
2017-10-12 11:54:16 -07:00
parent 49e570e136
commit 8a67041ed9
6 changed files with 19 additions and 14 deletions

View File

@@ -33,13 +33,14 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
// when the extension host process goes down ?
}
public $createTerminal(name?: string, shellPath?: string, shellArgs?: string[], waitOnExit?: boolean): TPromise<number> {
public $createTerminal(name?: string, shellPath?: string, shellArgs?: string[], env?: { [key: string]: string }, waitOnExit?: boolean): TPromise<number> {
const shellLaunchConfig: IShellLaunchConfig = {
name,
executable: shellPath,
args: shellArgs,
waitOnExit,
ignoreConfigurationCwd: true
ignoreConfigurationCwd: true,
env
};
return TPromise.as(this.terminalService.createInstance(shellLaunchConfig).id);
}