Add cwd to TerminalOptions for extension API

This commit is contained in:
cleidigh
2017-11-11 16:31:03 -05:00
parent 099025d9ba
commit adb68e27f4
4 changed files with 13 additions and 4 deletions

View File

@@ -24,6 +24,7 @@ export class ExtHostTerminal implements vscode.Terminal {
name?: string,
shellPath?: string,
shellArgs?: string[],
cwd?: string,
env?: { [key: string]: string },
waitOnExit?: boolean
) {
@@ -33,7 +34,8 @@ export class ExtHostTerminal implements vscode.Terminal {
this._pidPromise = new TPromise<number>(c => {
this._pidPromiseComplete = c;
});
this._proxy.$createTerminal(name, shellPath, shellArgs, env, waitOnExit).then((id) => {
this._proxy.$createTerminal(name, shellPath, shellArgs, cwd, env, waitOnExit).then((id) => {
this._id = id;
this._queuedRequests.forEach((r) => {
r.run(this._proxy, this._id);
@@ -114,7 +116,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
}
public createTerminalFromOptions(options: vscode.TerminalOptions): vscode.Terminal {
let terminal = new ExtHostTerminal(this._proxy, options.name, options.shellPath, options.shellArgs, options.env/*, options.waitOnExit*/);
let terminal = new ExtHostTerminal(this._proxy, options.name, options.shellPath, options.shellArgs, options.cwd, options.env /*, options.waitOnExit*/);
this._terminals.push(terminal);
return terminal;
}