diff --git a/src/calanonsync/calanonsync.go b/src/calanonsync/calanonsync.go index e4e4693..8527a15 100644 --- a/src/calanonsync/calanonsync.go +++ b/src/calanonsync/calanonsync.go @@ -1,8 +1,10 @@ package main import ( + "fmt" "github.com/spf13/cobra" "log" + "os" "time" ) @@ -13,7 +15,10 @@ func main() { Run: runSynchronization, } - rootCmd.Execute() + if err := rootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } } func runSynchronization(cmd *cobra.Command, args []string) {