mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 09:10:30 -04:00
Merge from vscode 011858832762aaff245b2336fb1c38166e7a10fb (#4663)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user