From c53c12385dc44610f51261b73cd06e8f50ff38dd Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 30 Dec 2022 12:54:45 +0100 Subject: [PATCH] fix #156173 (#170287) --- .../platform/native/electron-main/nativeHostMainService.ts | 4 +++- src/vs/platform/window/common/window.ts | 3 +++ src/vs/workbench/browser/actions/workspaceCommands.ts | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts index 4c8798d1631fd..0397052b05f76 100644 --- a/src/vs/platform/native/electron-main/nativeHostMainService.ts +++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts @@ -164,7 +164,9 @@ export class NativeHostMainService extends Disposable implements INativeHostMain gotoLineMode: options.gotoLineMode, noRecentEntry: options.noRecentEntry, waitMarkerFileURI: options.waitMarkerFileURI, - remoteAuthority: options.remoteAuthority || undefined + remoteAuthority: options.remoteAuthority || undefined, + forceProfile: options.forceProfile, + forceTempProfile: options.forceTempProfile, }); } } diff --git a/src/vs/platform/window/common/window.ts b/src/vs/platform/window/common/window.ts index 85d442d8b06aa..186a1a81c83be 100644 --- a/src/vs/platform/window/common/window.ts +++ b/src/vs/platform/window/common/window.ts @@ -54,6 +54,9 @@ export interface IOpenWindowOptions extends IBaseOpenWindowsOptions { readonly gotoLineMode?: boolean; readonly waitMarkerFileURI?: URI; + + readonly forceProfile?: string; + readonly forceTempProfile?: boolean; } export interface IAddFoldersRequest { diff --git a/src/vs/workbench/browser/actions/workspaceCommands.ts b/src/vs/workbench/browser/actions/workspaceCommands.ts index 6c234a113c068..6a52c349866f6 100644 --- a/src/vs/workbench/browser/actions/workspaceCommands.ts +++ b/src/vs/workbench/browser/actions/workspaceCommands.ts @@ -155,6 +155,8 @@ interface IOpenFolderAPICommandOptions { forceReuseWindow?: boolean; noRecentEntry?: boolean; forceLocalWindow?: boolean; + forceProfile?: string; + forceTempProfile?: boolean; } CommandsRegistry.registerCommand({ @@ -187,7 +189,9 @@ CommandsRegistry.registerCommand({ forceNewWindow: arg?.forceNewWindow, forceReuseWindow: arg?.forceReuseWindow, noRecentEntry: arg?.noRecentEntry, - remoteAuthority: arg?.forceLocalWindow ? null : undefined + remoteAuthority: arg?.forceLocalWindow ? null : undefined, + forceProfile: arg?.forceProfile, + forceTempProfile: arg?.forceTempProfile, }; const uriToOpen: IWindowOpenable = (hasWorkspaceFileExtension(uri) || uri.scheme === Schemas.untitled) ? { workspaceUri: uri } : { folderUri: uri };