From 4cda6d348f94b9340f46a2776d67d23ca44affbd Mon Sep 17 00:00:00 2001 From: Tristan Morgan Date: Wed, 27 Jan 2021 14:51:49 +1100 Subject: [PATCH] exit non-zero on updatedb error. --- cmd/updatedb.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/updatedb.go b/cmd/updatedb.go index 3635230e..74b0e8fa 100644 --- a/cmd/updatedb.go +++ b/cmd/updatedb.go @@ -22,6 +22,8 @@ package cmd import ( "fmt" + "os" + "github.com/servian/TechChallengeApp/db" "github.com/spf13/cobra" @@ -37,6 +39,7 @@ var updatedbCmd = &cobra.Command{ if err != nil { fmt.Println(err) + os.Exit(1) } }, }