From cb5ec3e7dc7999ca802284546b2c5d457dd435dd Mon Sep 17 00:00:00 2001 From: Denis Gukov Date: Tue, 1 Feb 2022 01:15:40 +0500 Subject: [PATCH] chore(cli): more human readable error message --- cli/cmd/root.go | 4 ++-- db/Migration.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cli/cmd/root.go b/cli/cmd/root.go index ab10965e..d6072c00 100644 --- a/cli/cmd/root.go +++ b/cli/cmd/root.go @@ -104,11 +104,11 @@ func createStore() db.Store { if err := store.Connect(); err != nil { switch err { case bbolt.ErrTimeout: - fmt.Println("\n BoltDB supports only one connection at a time. You should stop Semaphore yo use CLI.") + fmt.Println("\n BoltDB supports only one connection at a time. You should stop Semaphore to use CLI.") default: fmt.Println("\n Have you run `semaphore setup`?") } - panic(err) + os.Exit(1) } err := db.Migrate(store) diff --git a/db/Migration.go b/db/Migration.go index 203de261..4510886c 100644 --- a/db/Migration.go +++ b/db/Migration.go @@ -56,7 +56,6 @@ func GetMigrations() []Migration { } func Migrate(d Store) error { - fmt.Println("Checking db migrations") didRun := false for _, version := range GetMigrations() {