From 8bfc2e839d6db3f60d8360dfbef68590883f1ccf Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Tue, 21 Jul 2020 15:53:47 -0400 Subject: [PATCH] Exit with 1 when enrollment fails. Fixes GH-152 --- ziti-router/subcmd/enrollgw.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ziti-router/subcmd/enrollgw.go b/ziti-router/subcmd/enrollgw.go index d14b7de92..2a5131dde 100644 --- a/ziti-router/subcmd/enrollgw.go +++ b/ziti-router/subcmd/enrollgw.go @@ -17,9 +17,9 @@ package subcmd import ( + "github.com/michaelquigley/pfxlog" "github.com/openziti/edge/gateway/enroll" "github.com/openziti/fabric/router" - "github.com/michaelquigley/pfxlog" "github.com/spf13/cobra" "io/ioutil" ) @@ -58,8 +58,7 @@ func enrollGw(cmd *cobra.Command, args []string) { } if err := enroller.Enroll(jwtBuf, true, *engine); err != nil { - log.Error(err) - return + log.Fatalf("enrollment failure: (%v)", err) } } else { panic(err)