feat: only persist cookies on app teardown

This commit is contained in:
James Houlahan
2020-12-16 15:45:37 +01:00
parent 7b4204591c
commit d3b0871cf1
7 changed files with 119 additions and 153 deletions

View File

@ -57,6 +57,9 @@ func run(b *base.Base, c *cli.Context) error {
// We want to remove old versions if the app exits successfully.
b.AddTeardownAction(b.Versioner.RemoveOldVersions)
// We want cookies to be saved to disk so they are loaded the next time.
b.AddTeardownAction(b.CookieJar.PersistCookies)
f := frontend.NewImportExport(
constants.Version,
constants.BuildVersion,