don't surface error on gets and remove microsoft secret migration. Fixes #146553

This commit is contained in:
Tyler Leonhardt
2022-04-14 12:18:25 -07:00
parent ed1eaf32f8
commit 5919378269
6 changed files with 51 additions and 112 deletions

View File

@@ -6,11 +6,8 @@
// keytar depends on a native module shipped in vscode, so this is
// how we load it
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import { Log } from './logger';
const localize = nls.loadMessageBundle();
export class Keychain {
constructor(
private readonly context: vscode.ExtensionContext,
@@ -24,11 +21,6 @@ export class Keychain {
} catch (e) {
// Ignore
this.Logger.error(`Setting token failed: ${e}`);
const troubleshooting = localize('troubleshooting', "Troubleshooting Guide");
const result = await vscode.window.showErrorMessage(localize('keychainWriteError', "Writing login information to the keychain failed with error '{0}'.", e.message), troubleshooting);
if (result === troubleshooting) {
vscode.env.openExternal(vscode.Uri.parse('https://code.visualstudio.com/docs/editor/settings-sync#_troubleshooting-keychain-issues'));
}
}
}