don't "delete" mandatory property; fixes #99479

This commit is contained in:
Andre Weinand
2020-06-16 12:41:10 +02:00
parent 09f3600f09
commit d4dbf77308
2 changed files with 33 additions and 30 deletions

View File

@@ -88,6 +88,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
const configProvider = await this._configurationService.getConfigProvider();
const shell = this._terminalService.getDefaultShell(true, configProvider);
let cwdForPrepareCommand: string | undefined;
if (needNewTerminal || !this._integratedTerminalInstance) {
@@ -97,8 +98,9 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
cwd: args.cwd,
name: args.title || nls.localize('debug.terminal.title', "debuggee"),
};
delete (args as any).cwd; // TODO: remove this any cast
this._integratedTerminalInstance = this._terminalService.createTerminalFromOptions(options);
} else {
cwdForPrepareCommand = args.cwd;
}
const terminal = this._integratedTerminalInstance;
@@ -106,7 +108,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
terminal.show();
const shellProcessId = await this._integratedTerminalInstance.processId;
const command = prepareCommand(args, shell);
const command = prepareCommand(shell, args.args, cwdForPrepareCommand, args.env);
terminal.sendText(command, true);
return shellProcessId;