mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #10762 from FrozenAndrey/fix#10747
etcdmain: fix ignoring of ETCD_CONFIG_FILE env variable
This commit is contained in:
commit
ea70731f53
@ -284,6 +284,14 @@ func (cfg *config) parse(arguments []string) error {
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
// This env variable must be parsed separately
|
||||
// because we need to determine whether to use or
|
||||
// ignore the env variables based on if the config file is set.
|
||||
if cfg.configFile == "" {
|
||||
cfg.configFile = os.Getenv(flags.FlagToEnv("ETCD", "config-file"))
|
||||
}
|
||||
|
||||
if cfg.configFile != "" {
|
||||
err = cfg.configFromFile(cfg.configFile)
|
||||
if lg := cfg.ec.GetLogger(); lg != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user