GODT-1976: Migrate app settings from prefs.json

This commit is contained in:
James Houlahan
2022-11-21 01:08:06 +01:00
parent 9e6cbcb35e
commit 7ed8d76d84
5 changed files with 260 additions and 0 deletions

View File

@ -194,6 +194,10 @@ func run(c *cli.Context) error { //nolint:funlen
return withSingleInstance(locations, version, func() error {
// Unlock the encrypted vault.
return WithVault(locations, func(vault *vault.Vault, insecure, corrupt bool) error {
if err := migrateOldSettings(vault); err != nil {
logrus.WithError(err).Error("Failed to migrate old settings")
}
// Load the cookies from the vault.
return withCookieJar(vault, func(cookieJar http.CookieJar) error {
// Create a new bridge instance.