diff --git a/cmd/helmsman/main.go b/cmd/helmsman/main.go index 41b75880..ca4a8d8f 100644 --- a/cmd/helmsman/main.go +++ b/cmd/helmsman/main.go @@ -2,8 +2,10 @@ package main import ( "github.com/Praqma/helmsman/internal/app" + "os" ) func main() { - app.Main() + exitCode := app.Main() + os.Exit(exitCode) } diff --git a/internal/app/main.go b/internal/app/main.go index 8e9e3414..1f73872f 100644 --- a/internal/app/main.go +++ b/internal/app/main.go @@ -32,7 +32,7 @@ func init() { } // Main is the app main function -func Main() { +func Main() int { var s State flags.parse() @@ -141,5 +141,5 @@ func Main() { exitCode = exitCodeSucceedWithChanges } - os.Exit(exitCode) + return exitCode }