mirror of
https://github.com/minio/minio.git
synced 2025-11-12 23:01:39 -05:00
Bring nicer ui error if creds are missing in Gateway (#6003)
This commit is contained in:
committed by
kannappanr
parent
69b9d6fbee
commit
537fd8c821
@@ -18,7 +18,6 @@ package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"os"
|
||||
@@ -151,10 +150,7 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
|
||||
|
||||
// Validate if we have access, secret set through environment.
|
||||
if !globalIsEnvCreds {
|
||||
reqInfo := (&logger.ReqInfo{}).AppendTags("gatewayName", gatewayName)
|
||||
contxt := logger.SetReqInfo(context.Background(), reqInfo)
|
||||
logger.LogIf(contxt, errors.New("Access and Secret keys should be set through ENVs for backend"))
|
||||
cli.ShowCommandHelpAndExit(ctx, gatewayName, 1)
|
||||
logger.Fatal(uiErrEnvCredentialsMissing(nil), "Unable to start gateway")
|
||||
}
|
||||
|
||||
// Create certs path.
|
||||
|
||||
Reference in New Issue
Block a user