mirror of
https://github.com/microsoft/vscode.git
synced 2026-06-03 06:04:37 +01:00
fix #141099
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user