Skip to content

Commit 37c5709

Browse files
authored
fix using defaults when creating from other profiles or templates (microsoft#188290)
microsoft#156144 fix using defaults when creating from other profiles or templates
1 parent 87340a1 commit 37c5709

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,27 +490,27 @@ export class UserDataProfileImportExportService extends Disposable implements IU
490490
return undefined;
491491
}
492492

493-
if (profileTemplate.settings) {
493+
if (profileTemplate.settings && !profile.useDefaultFlags?.settings) {
494494
progress(localize('progress settings', "Applying Settings..."));
495495
await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
496496
}
497-
if (profileTemplate.keybindings) {
497+
if (profileTemplate.keybindings && !profile.useDefaultFlags?.keybindings) {
498498
progress(localize('progress keybindings', "Applying Keyboard Shortcuts..."));
499499
await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
500500
}
501-
if (profileTemplate.tasks) {
501+
if (profileTemplate.tasks && !profile.useDefaultFlags?.tasks) {
502502
progress(localize('progress tasks', "Applying Tasks..."));
503503
await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
504504
}
505-
if (profileTemplate.snippets) {
505+
if (profileTemplate.snippets && !profile.useDefaultFlags?.snippets) {
506506
progress(localize('progress snippets', "Applying Snippets..."));
507507
await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
508508
}
509-
if (profileTemplate.globalState) {
509+
if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
510510
progress(localize('progress global state', "Applying State..."));
511511
await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
512512
}
513-
if (profileTemplate.extensions && extensions) {
513+
if (profileTemplate.extensions && extensions && !profile.useDefaultFlags?.extensions) {
514514
progress(localize('progress extensions', "Applying Extensions..."));
515515
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile);
516516
}

0 commit comments

Comments
 (0)