diff options
author | Megan Rogge <merogge@microsoft.com> | 2022-06-08 01:10:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-08 01:10:46 +0300 |
commit | 8adb9e72c727c490623232b48d0fe10c7f42d7a0 (patch) | |
tree | fdd78a2ac56631cde9215d4c0e316b334f73373a /src/vs | |
parent | 0dfe96e423ce3b26e5499ce03af7b7f86ac8d6fe (diff) |
wait for profiles to be ready before creating 1st terminal (#151452)
fix #138999
Diffstat (limited to 'src/vs')
-rw-r--r-- | src/vs/workbench/contrib/terminal/browser/terminalService.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vs/workbench/contrib/terminal/browser/terminalService.ts b/src/vs/workbench/contrib/terminal/browser/terminalService.ts index 62d52e82cc9..06a447308f8 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalService.ts @@ -929,12 +929,10 @@ export class TerminalService implements ITerminalService { // Await the initialization of available profiles as long as this is not a pty terminal or a // local terminal in a remote workspace as profile won't be used in those cases and these // terminals need to be launched before remote connections are established. - if (!this._terminalProfileService.availableProfiles) { - const isPtyTerminal = options?.config && 'customPtyImplementation' in options.config; - const isLocalInRemoteTerminal = this._remoteAgentService.getConnection() && URI.isUri(options?.cwd) && options?.cwd.scheme === Schemas.vscodeFileResource; - if (!isPtyTerminal && !isLocalInRemoteTerminal) { - await this._terminalProfileService.refreshAvailableProfiles(); - } + const isPtyTerminal = options?.config && 'customPtyImplementation' in options.config; + const isLocalInRemoteTerminal = this._remoteAgentService.getConnection() && URI.isUri(options?.cwd) && options?.cwd.scheme === Schemas.vscodeFileResource; + if (!isPtyTerminal && !isLocalInRemoteTerminal) { + await this._terminalProfileService.profilesReady; } const config = options?.config || this._terminalProfileService.availableProfiles?.find(p => p.profileName === this._terminalProfileService.getDefaultProfileName()); |