mirror of
https://github.com/minio/minio.git
synced 2025-04-01 10:13:42 -04:00
config: Do not validate creds when set via env (#3955)
It is useless to validate access/secret keys stored in config file when the user sets them in the environment.
This commit is contained in:
parent
d4ca2ee1a3
commit
7f5a5b5e9d
@ -235,10 +235,13 @@ func validateConfig() error {
|
|||||||
return fmt.Errorf("Browser config value %s is invalid", b)
|
return fmt.Errorf("Browser config value %s is invalid", b)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate credential field
|
// Validate credential fields only when
|
||||||
|
// they are not set via the environment
|
||||||
|
if !globalIsEnvCreds {
|
||||||
if !srvCfg.Credential.IsValid() {
|
if !srvCfg.Credential.IsValid() {
|
||||||
return errors.New("invalid credential")
|
return errors.New("invalid credential")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate logger field
|
// Validate logger field
|
||||||
if err := srvCfg.Logger.Validate(); err != nil {
|
if err := srvCfg.Logger.Validate(); err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user