Merge from vscode 011858832762aaff245b2336fb1c38166e7a10fb (#4663)

This commit is contained in:
Anthony Dresser
2019-03-22 13:07:54 -07:00
committed by GitHub
parent f5c9174c2f
commit 4a87a24235
296 changed files with 2531 additions and 2472 deletions

View File

@@ -22,7 +22,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
import { IProductService } from 'vs/platform/product/common/product';
import { ITerminalInstanceService } from 'vs/workbench/contrib/terminal/browser/terminal';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IRemoteEnvironmentService } from 'vs/workbench/services/remote/common/remoteEnvironmentService';
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
/** The amount of time to consider terminal errors to be related to the launch */
const LAUNCHING_DURATION = 500;
@@ -77,7 +77,7 @@ export class TerminalProcessManager implements ITerminalProcessManager {
@IEnvironmentService private readonly _environmentService: IEnvironmentService,
@IProductService private readonly _productService: IProductService,
@ITerminalInstanceService private readonly _terminalInstanceService: ITerminalInstanceService,
@IRemoteEnvironmentService private readonly _remoteEnvironmentService: IRemoteEnvironmentService
@IRemoteAgentService private readonly _remoteAgentService: IRemoteAgentService
) {
this.ptyProcessReady = new Promise<void>(c => {
this.onProcessReady(() => {
@@ -123,7 +123,7 @@ export class TerminalProcessManager implements ITerminalProcessManager {
this.os = platform.OS;
if (launchRemotely) {
if (hasRemoteAuthority) {
this._remoteEnvironmentService.remoteEnvironment.then(env => {
this._remoteAgentService.getEnvironment().then(env => {
if (!env) {
return;
}
@@ -250,6 +250,7 @@ export class TerminalProcessManager implements ITerminalProcessManager {
}
public async getLatency(): Promise<number> {
await this.ptyProcessReady;
if (!this._process) {
return Promise.resolve(0);
}