Skip to content

Commit fc7d920

Browse files
authored
return args instead of profile (microsoft#158750)
1 parent b314c8f commit fc7d920

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/platform/userDataProfile/electron-main/userDataProfile.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface IUserDataProfilesMainService extends IUserDataProfilesService {
2121
isEnabled(): boolean;
2222
getOrSetProfileForWorkspace(workspaceIdentifier: WorkspaceIdentifier, profileToSet?: IUserDataProfile): IUserDataProfile;
2323
setProfileForWorkspaceSync(workspaceIdentifier: WorkspaceIdentifier, profileToSet: IUserDataProfile): void;
24-
checkAndCreateProfileFromCli(args: NativeParsedArgs): Promise<IUserDataProfile> | undefined;
24+
checkAndCreateProfileFromCli(args: NativeParsedArgs): Promise<NativeParsedArgs> | undefined;
2525
unsetWorkspace(workspaceIdentifier: WorkspaceIdentifier, transient?: boolean): void;
2626
readonly onWillCreateProfile: Event<WillCreateProfileEvent>;
2727
readonly onWillRemoveProfile: Event<WillRemoveProfileEvent>;
@@ -43,7 +43,7 @@ export class UserDataProfilesMainService extends UserDataProfilesService impleme
4343
return this.enabled;
4444
}
4545

46-
checkAndCreateProfileFromCli(args: NativeParsedArgs): Promise<IUserDataProfile> | undefined {
46+
checkAndCreateProfileFromCli(args: NativeParsedArgs): Promise<NativeParsedArgs> | undefined {
4747
if (!this.isEnabled()) {
4848
return undefined;
4949
}
@@ -55,14 +55,14 @@ export class UserDataProfilesMainService extends UserDataProfilesService impleme
5555
if (this.profiles.some(p => p.name === args.profile)) {
5656
return undefined;
5757
}
58-
return this.createProfile(args.profile);
58+
return this.createProfile(args.profile).then(() => args);
5959
}
6060
if (args['profile-transient']) {
6161
return this.createTransientProfile()
6262
.then(profile => {
6363
// Set the profile name to use
6464
args.profile = profile.name;
65-
return profile;
65+
return args;
6666
});
6767
}
6868
return undefined;

0 commit comments

Comments
 (0)