From 0881f075efad1e170092672d0159f62f4bd3fc42 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Wed, 11 Sep 2024 08:03:16 +0200 Subject: [PATCH] fix: add exit after database connection test failed --- pkg/helper.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/helper.go b/pkg/helper.go index a87b328..a161f04 100644 --- a/pkg/helper.go +++ b/pkg/helper.go @@ -118,8 +118,7 @@ func testDatabaseConnection(db *dbConfig) { cmd.Stderr = &out err := cmd.Run() if err != nil { - utils.Error("Error testing database connection: %v\nOutput: %s", err, out.String()) - os.Exit(1) + utils.Fatal("Error testing database connection: %v\nOutput: %s", err, out.String()) } utils.Info("Successfully connected to %s database", db.dbName)