File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
src/vs/workbench/services/userDataProfile/browser Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,16 @@ export class UserDataProfileManagementService extends Disposable implements IUse
87
87
}
88
88
89
89
private async enterProfile ( profile : IUserDataProfile , preserveData : boolean , reloadMessage ?: string ) : Promise < void > {
90
- if ( this . environmentService . remoteAuthority ) {
90
+ const isRemoteWindow = ! ! this . environmentService . remoteAuthority ;
91
+
92
+ if ( ! isRemoteWindow ) {
93
+ this . extensionService . stopExtensionHosts ( ) ;
94
+ }
95
+
96
+ // In a remote window update current profile before reloading so that data is preserved from current profile if asked to preserve
97
+ await this . userDataProfileService . updateCurrentProfile ( profile , preserveData ) ;
98
+
99
+ if ( isRemoteWindow ) {
91
100
const result = await this . dialogService . confirm ( {
92
101
type : 'info' ,
93
102
message : reloadMessage ?? localize ( 'reload message' , "Switching a settings profile requires reloading VS Code." ) ,
@@ -96,12 +105,9 @@ export class UserDataProfileManagementService extends Disposable implements IUse
96
105
if ( result . confirmed ) {
97
106
await this . hostService . reload ( ) ;
98
107
}
99
- return ;
108
+ } else {
109
+ await this . extensionService . startExtensionHosts ( ) ;
100
110
}
101
-
102
- this . extensionService . stopExtensionHosts ( ) ;
103
- await this . userDataProfileService . updateCurrentProfile ( profile , preserveData ) ;
104
- await this . extensionService . startExtensionHosts ( ) ;
105
111
}
106
112
}
107
113
You can’t perform that action at this time.
0 commit comments