@@ -284,11 +284,6 @@ export class BrowserMain extends Disposable {
284284 // User Data Profiles
285285 const userDataProfilesService = new BrowserUserDataProfilesService ( environmentService , fileService , uriIdentityService , logService ) ;
286286 serviceCollection . set ( IUserDataProfilesService , userDataProfilesService ) ;
287- const lastActiveProfile = environmentService . lastActiveProfile ? userDataProfilesService . profiles . find ( p => p . id === environmentService . lastActiveProfile ) : undefined ;
288- const currentProfile = userDataProfilesService . getOrSetProfileForWorkspace ( isWorkspaceIdentifier ( workspace ) || isSingleFolderWorkspaceIdentifier ( workspace ) ? workspace : 'empty-window' , lastActiveProfile ?? userDataProfilesService . defaultProfile ) ;
289- const userDataProfileService = new UserDataProfileService ( currentProfile , userDataProfilesService ) ;
290- serviceCollection . set ( IUserDataProfileService , userDataProfileService ) ;
291-
292287 let isProfilesEnablementConfigured = false ;
293288 if ( environmentService . remoteAuthority ) {
294289 // Always Disabled in web with remote connection
@@ -304,6 +299,11 @@ export class BrowserMain extends Disposable {
304299 }
305300 }
306301
302+ const lastActiveProfile = environmentService . lastActiveProfile ? userDataProfilesService . profiles . find ( p => p . id === environmentService . lastActiveProfile ) : undefined ;
303+ const currentProfile = userDataProfilesService . getOrSetProfileForWorkspace ( isWorkspaceIdentifier ( workspace ) || isSingleFolderWorkspaceIdentifier ( workspace ) ? workspace : 'empty-window' , lastActiveProfile ?? userDataProfilesService . defaultProfile ) ;
304+ const userDataProfileService = new UserDataProfileService ( currentProfile , userDataProfilesService ) ;
305+ serviceCollection . set ( IUserDataProfileService , userDataProfileService ) ;
306+
307307 // Long running services (workspace, config, storage)
308308 const [ configurationService , storageService ] = await Promise . all ( [
309309 this . createWorkspaceService ( workspace , environmentService , userDataProfileService , userDataProfilesService , fileService , remoteAgentService , uriIdentityService , logService ) . then ( service => {
0 commit comments