mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-25 00:44:05 +01:00
Fix #103238
This commit is contained in:
@@ -431,6 +431,9 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
|
||||
|
||||
private async turnOn(): Promise<void> {
|
||||
try {
|
||||
if (!this.userDataSyncWorkbenchService.authenticationProviders.length) {
|
||||
throw new Error(localize('no authentication providers', "No authentication providers available."));
|
||||
}
|
||||
if (!this.storageService.getBoolean('sync.donotAskPreviewConfirmation', StorageScope.GLOBAL, false)) {
|
||||
if (!await this.askForConfirmation()) {
|
||||
return;
|
||||
@@ -478,7 +481,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.notificationService.error(localize('turn on failed', "Error while starting Sync: {0}", toErrorMessage(e)));
|
||||
this.notificationService.error(localize('turn on failed', "Error while starting Settings Sync: {0}", toErrorMessage(e)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -246,6 +246,9 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
|
||||
}
|
||||
|
||||
async turnOn(): Promise<void> {
|
||||
if (!this.authenticationProviders.length) {
|
||||
throw new Error(localize('no authentication providers', "Settings sync cannot be turned on because there are no authentication providers available."));
|
||||
}
|
||||
if (this.userDataAutoSyncService.isEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user