Fix unit tests

This commit is contained in:
Daniel Imms 2022-02-17 13:01:53 -08:00
parent a9002ffa96
commit 19b1a217cd
3 changed files with 4 additions and 4 deletions

View file

@ -441,7 +441,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
this._xtermReadyPromise.then(async () => {
// Wait for a period to allow a container to be ready
await this._containerReadyBarrier.wait();
if (this._configHelper.config.shellIntegration.enabled && !this.shellLaunchConfig.executable) {
if (this._configHelper.config.shellIntegration?.enabled && !this.shellLaunchConfig.executable) {
const os = await this._processManager.getBackendOS();
this.shellLaunchConfig.executable = (await this._terminalProfileResolverService.getDefaultProfile({ remoteAuthority: this.remoteAuthority, os })).path;
}

View file

@ -243,7 +243,7 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
os: this.os
});
try {
const shellIntegration = terminalEnvironment.injectShellIntegrationArgs(this._logService, this._configurationService, env, this._configHelper.config.shellIntegration.enabled, shellLaunchConfig, this.os);
const shellIntegration = terminalEnvironment.injectShellIntegrationArgs(this._logService, this._configurationService, env, this._configHelper.config.shellIntegration?.enabled || false, shellLaunchConfig, this.os);
this.shellIntegrationAttempted = shellIntegration.enableShellIntegration;
if (this.shellIntegrationAttempted && shellIntegration.args) {
const remoteEnv = await this._remoteAgentService.getEnvironment();
@ -448,7 +448,7 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
const env = await this._resolveEnvironment(backend, variableResolver, shellLaunchConfig);
const shellIntegration = terminalEnvironment.injectShellIntegrationArgs(this._logService, this._configurationService, env, this._configHelper.config.shellIntegration.enabled, shellLaunchConfig, OS);
const shellIntegration = terminalEnvironment.injectShellIntegrationArgs(this._logService, this._configurationService, env, this._configHelper.config.shellIntegration?.enabled || false, shellLaunchConfig, OS);
if (shellIntegration.enableShellIntegration) {
shellLaunchConfig.args = shellIntegration.args;
// Always resolve the injected arguments on local processes

View file

@ -290,7 +290,7 @@ export interface ITerminalConfiguration {
persistentSessionReviveProcess: 'onExit' | 'onExitAndWindowClose' | 'never';
ignoreProcessNames: string[];
autoReplies: { [key: string]: string };
shellIntegration: {
shellIntegration?: {
enabled: boolean;
};
}