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
This commit is contained in:
kannappanr 2017-11-01 11:45:27 -07:00 committed by Dee Koder
parent 34a1b58a75
commit 26e9f78a86

View File

@ -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.