Add logging

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2025-04-16 08:43:03 +01:00
parent 6964c51cc3
commit bec721cf57
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D

View File

@ -102,6 +102,7 @@ class Store extends ElectronStore<{
throw new Error("safeStorage is not available"); throw new Error("safeStorage is not available");
} }
try {
const credentials = [ const credentials = [
...(await keytar.findCredentials(LEGACY_KEYTAR_SERVICE)), ...(await keytar.findCredentials(LEGACY_KEYTAR_SERVICE)),
...(await keytar.findCredentials(KEYTAR_SERVICE)), ...(await keytar.findCredentials(KEYTAR_SERVICE)),
@ -113,6 +114,10 @@ class Store extends ElectronStore<{
await this.deleteSecretKeytar(LEGACY_KEYTAR_SERVICE, cred.account); await this.deleteSecretKeytar(LEGACY_KEYTAR_SERVICE, cred.account);
} }
console.info(`Store migration done: found ${credentials.length} credentials`); console.info(`Store migration done: found ${credentials.length} credentials`);
} catch (e) {
console.error("Store migration failed:", e);
throw e;
}
} }
/** /**