Skip to content

Commit

Permalink
fix: exit early if db initialization fails
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed Sep 12, 2024
1 parent b012327 commit 2e16260
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 2e16260

Please sign in to comment.