Display help when access/secret key is not set (#5132)

Display help message, when access and secret keys are not set in
any of the gateway.

Fixes #5124
master
kannappanr 7 years ago committed by Dee Koder
parent 34a1b58a75
commit 26e9f78a86
  1. 3
      cmd/gateway-main.go

@ -144,7 +144,8 @@ func startGateway(ctx *cli.Context, gw Gateway) {
// Validate if we have access, secret set through environment.
gatewayName := gw.Name()
if !globalIsEnvCreds {
fatalIf(fmt.Errorf("Access and Secret keys should be set through ENVs for backend [%s]", gatewayName), "")
errorIf(errors.New("Access and secret keys not set"), "Access and Secret keys should be set through ENVs for backend [%s]", gatewayName)
cli.ShowCommandHelpAndExit(ctx, gatewayName, 1)
}
// Create certs path.

Loading…
Cancel
Save