@@ -284,11 +284,6 @@ export class BrowserMain extends Disposable {
284
284
// User Data Profiles
285
285
const userDataProfilesService = new BrowserUserDataProfilesService ( environmentService , fileService , uriIdentityService , logService ) ;
286
286
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
-
292
287
let isProfilesEnablementConfigured = false ;
293
288
if ( environmentService . remoteAuthority ) {
294
289
// Always Disabled in web with remote connection
@@ -304,6 +299,11 @@ export class BrowserMain extends Disposable {
304
299
}
305
300
}
306
301
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
+
307
307
// Long running services (workspace, config, storage)
308
308
const [ configurationService , storageService ] = await Promise . all ( [
309
309
this . createWorkspaceService ( workspace , environmentService , userDataProfileService , userDataProfilesService , fileService , remoteAgentService , uriIdentityService , logService ) . then ( service => {
0 commit comments