Skip to content

Commit 51da365

Browse files
authored
Merge pull request microsoft#210799 from microsoft/tyriar/207372_3
Allow embedder terminals to skip contributed profile check
2 parents 77676e6 + 36fbbb1 commit 51da365

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/vs/workbench/contrib/terminal/browser/terminal.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,12 @@ export interface ICreateTerminalOptions {
438438
* The terminal's location (editor or panel), it's terminal parent (split to the right), or editor group
439439
*/
440440
location?: ITerminalLocationOptions;
441+
442+
/**
443+
* This terminal will not wait for contributed profiles to resolve which means it will proceed
444+
* when the workbench is not yet loaded.
445+
*/
446+
skipContributedProfileCheck?: boolean;
441447
}
442448

443449
export interface TerminalEditorLocation {

src/vs/workbench/contrib/terminal/browser/terminalMainContribution.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export class TerminalMainContribution extends Disposable implements IWorkbenchCo
6666
this._register(embedderTerminalService.onDidCreateTerminal(async embedderTerminal => {
6767
const terminal = await terminalService.createTerminal({
6868
config: embedderTerminal,
69-
location: TerminalLocation.Panel
69+
location: TerminalLocation.Panel,
70+
skipContributedProfileCheck: true,
7071
});
7172
terminalService.setActiveInstance(terminal);
7273
await terminalService.revealActiveTerminal();

src/vs/workbench/contrib/terminal/browser/terminalService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ export class TerminalService extends Disposable implements ITerminalService {
952952
const shellLaunchConfig = config && 'extensionIdentifier' in config ? {} : this._terminalInstanceService.convertProfileToShellLaunchConfig(config || {});
953953

954954
// Get the contributed profile if it was provided
955-
const contributedProfile = await this._getContributedProfile(shellLaunchConfig, options);
955+
const contributedProfile = options?.skipContributedProfileCheck ? undefined : await this._getContributedProfile(shellLaunchConfig, options);
956956

957957
const splitActiveTerminal = typeof options?.location === 'object' && 'splitActiveTerminal' in options.location ? options.location.splitActiveTerminal : typeof options?.location === 'object' ? 'parentTerminal' in options.location : false;
958958

0 commit comments

Comments
 (0)