From fc7d9202e3b1b891d177fb52c636ce1d81ce0903 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 Aug 2022 15:06:30 +0200 Subject: [PATCH] return args instead of profile (#158750) --- .../userDataProfile/electron-main/userDataProfile.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/platform/userDataProfile/electron-main/userDataProfile.ts b/src/vs/platform/userDataProfile/electron-main/userDataProfile.ts index 1df05a6205a..9bef47e4a4b 100644 --- a/src/vs/platform/userDataProfile/electron-main/userDataProfile.ts +++ b/src/vs/platform/userDataProfile/electron-main/userDataProfile.ts @@ -21,7 +21,7 @@ export interface IUserDataProfilesMainService extends IUserDataProfilesService { isEnabled(): boolean; getOrSetProfileForWorkspace(workspaceIdentifier: WorkspaceIdentifier, profileToSet?: IUserDataProfile): IUserDataProfile; setProfileForWorkspaceSync(workspaceIdentifier: WorkspaceIdentifier, profileToSet: IUserDataProfile): void; - checkAndCreateProfileFromCli(args: NativeParsedArgs): Promise | undefined; + checkAndCreateProfileFromCli(args: NativeParsedArgs): Promise | undefined; unsetWorkspace(workspaceIdentifier: WorkspaceIdentifier, transient?: boolean): void; readonly onWillCreateProfile: Event; readonly onWillRemoveProfile: Event; @@ -43,7 +43,7 @@ export class UserDataProfilesMainService extends UserDataProfilesService impleme return this.enabled; } - checkAndCreateProfileFromCli(args: NativeParsedArgs): Promise | undefined { + checkAndCreateProfileFromCli(args: NativeParsedArgs): Promise | undefined { if (!this.isEnabled()) { return undefined; } @@ -55,14 +55,14 @@ export class UserDataProfilesMainService extends UserDataProfilesService impleme if (this.profiles.some(p => p.name === args.profile)) { return undefined; } - return this.createProfile(args.profile); + return this.createProfile(args.profile).then(() => args); } if (args['profile-transient']) { return this.createTransientProfile() .then(profile => { // Set the profile name to use args.profile = profile.name; - return profile; + return args; }); } return undefined;