diff --git a/cmd/root.go b/cmd/root.go index 5366c37b7..91152423b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -27,6 +27,7 @@ func InitContext() (context.Context, error) { ctx, closer, err := duty.Start("canary-checker", duty.SkipChangelogMigration, duty.SkipMigrationByDefaultMode) if err != nil { logger.Fatalf("Failed to initialize db: %v", err.Error()) + runner.ShutdownAndExit(1, err.Error()) } runner.AddShutdownHook(closer)