GODT-2056: kill old bridge from v2 lock file.

This commit is contained in:
Jakub
2022-11-14 11:42:24 +01:00
committed by James Houlahan
parent 27cbcc6f5e
commit 4f3748a4f0
4 changed files with 112 additions and 76 deletions

View File

@ -166,6 +166,8 @@ func run(c *cli.Context) error { //nolint:funlen
exe = os.Args[0]
}
migrationErr := migrateOldVersions()
// Run with profiling if requested.
return withProfiler(c, func() error {
// Restart the app if requested.
@ -176,6 +178,9 @@ func run(c *cli.Context) error { //nolint:funlen
return WithLocations(func(locations *locations.Locations) error {
// Initialize logging.
return withLogging(c, crashHandler, locations, func() error {
if migrationErr != nil {
logrus.WithError(migrationErr).Error("Migration failed")
}
// Ensure we are the only instance running.
return withSingleInstance(locations, version, func() error {
// Unlock the encrypted vault.