Exit with 1 when enrollment fails. Fixes GH-152

This commit is contained in:
Paul Lorenz
2020-07-21 15:53:47 -04:00
parent 2d886ff19c
commit 8bfc2e839d
+2 -3
View File
@@ -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)