This commit is contained in:
meganrogge
2022-01-24 18:28:09 -06:00
parent a1f05c89f6
commit a50bda883f
@@ -384,6 +384,10 @@ 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.enableShellIntegration && !this.shellLaunchConfig.executable) {
const os = await this._getBackendOS();
this.shellLaunchConfig.executable = (await this._terminalProfileResolverService.getDefaultProfile({ remoteAuthority: this.remoteAuthority, os })).path;
}
await this._createProcess();
// Re-establish the title after reconnect
@@ -1299,6 +1303,18 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
return os === OperatingSystem.Windows;
}
private async _getBackendOS(): Promise<OperatingSystem> {
let os = OS;
if (!!this.remoteAuthority) {
const remoteEnv = await this._remoteAgentService.getEnvironment();
if (!remoteEnv) {
throw new Error(`Failed to get remote environment for remote authority "${this.remoteAuthority}"`);
}
os = remoteEnv.os;
}
return os;
}
private _onProcessData(ev: IProcessDataEvent): void {
const messageId = ++this._latestXtermWriteData;
if (ev.trackCommit) {