diff --git a/go.mod b/go.mod index a82ca984..54262b95 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,6 @@ require ( github.com/onsi/ginkgo/v2 v2.9.4 github.com/onsi/gomega v1.27.6 github.com/patrickmn/go-cache v2.1.0+incompatible - github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 github.com/zclconf/go-cty v1.13.1 @@ -95,6 +94,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/robertkrimen/otto v0.2.1 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect diff --git a/hack/migrate/main.go b/hack/migrate/main.go index 0fefb9de..fae62c2a 100644 --- a/hack/migrate/main.go +++ b/hack/migrate/main.go @@ -1,8 +1,6 @@ package main import ( - "os" - "github.com/flanksource/commons/logger" "github.com/flanksource/duty" "github.com/spf13/cobra" @@ -22,6 +20,6 @@ var connection string func main() { migrate.Flags().StringVar(&connection, "db-url", "", "Database URI: scheme://user:pass@host:port/database") if err := migrate.Execute(); err != nil { - os.Exit(1) + logger.Fatalf("failed to run migration: %v", err) } }