etcdmain: fix ignoring of ETCD_CONFIG_FILE env variable
Fixes #10747 Signed-off-by: Andrey Abramov <st5pub@yandex.ru>release-3.4
parent
2ff2755528
commit
6955331901
|
@ -283,6 +283,11 @@ func (cfg *config) parse(arguments []string) error {
|
|||
}
|
||||
|
||||
var err error
|
||||
|
||||
if cfg.configFile == "" {
|
||||
cfg.configFile = os.Getenv("ETCD_CONFIG_FILE")
|
||||
}
|
||||
|
||||
if cfg.configFile != "" {
|
||||
err = cfg.configFromFile(cfg.configFile)
|
||||
if lg := cfg.ec.GetLogger(); lg != nil {
|
||||
|
|
Loading…
Reference in New Issue