Skip to content

Commit

Permalink
listener config is now mandatory for run and runsa
Browse files Browse the repository at this point in the history
  • Loading branch information
equinox0815 committed Jan 20, 2025
1 parent 14a9323 commit 0967782
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions cmd/whawty-auth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,9 @@ func cmdRun(c *cli.Context) error {
return cli.NewExitError(err.Error(), 3)
}

var lc *listenerConfig
if c.String("listener") != "" {
lc, err = readListenerConfig(c.String("listener"))
if err != nil {
return cli.NewExitError(err.Error(), 1)
}
lc, err := readListenerConfig(c.String("listener"))
if err != nil {
return cli.NewExitError(err.Error(), 1)
}

var wg sync.WaitGroup
Expand Down Expand Up @@ -445,12 +442,9 @@ func cmdRunSa(c *cli.Context) error {
return cli.NewExitError(err.Error(), 3)
}

var lc *listenerConfig
if c.String("listener") != "" {
lc, err = readListenerConfig(c.String("listener"))
if err != nil {
return cli.NewExitError(err.Error(), 1)
}
lc, err := readListenerConfig(c.String("listener"))
if err != nil {
return cli.NewExitError(err.Error(), 1)
}

listenerGroups, err := activation.ListenersWithNames()
Expand Down Expand Up @@ -666,7 +660,7 @@ func main() {
Flags: []cli.Flag{
cli.StringFlag{
Name: "listener",
Value: "",
Value: "/etc/whawty/auth-listener.yaml",
Usage: "path to the listener configuration file",
EnvVar: "WHAWTY_AUTH_LISTENER_CONFIG",
},
Expand All @@ -679,7 +673,7 @@ func main() {
Flags: []cli.Flag{
cli.StringFlag{
Name: "listener",
Value: "",
Value: "/etc/whawty/auth-listener.yaml",
Usage: "path to the listener configuration file",
EnvVar: "WHAWTY_AUTH_LISTENER_CONFIG",
},
Expand Down

0 comments on commit 0967782

Please sign in to comment.