mirror of
https://github.com/openziti/ziti.git
synced 2026-10-12 23:32:02 +00:00
Merge pull request #153 from openziti/fix-enroll-failure-exit-code
Exit with 1 when enrollment fails. Fixes GH-152
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user