mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
use env for flags wtih dot in name (#4415)
This commit is contained in:
parent
9f55c7c90e
commit
4131874fa8
|
@ -1059,10 +1059,12 @@ func (f *FlagSet) ParseEnv(environ []string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
envKey := strings.ToUpper(flag.Name)
|
envKey := strings.ToUpper(flag.Name)
|
||||||
|
|
||||||
if f.envPrefix != "" {
|
if f.envPrefix != "" {
|
||||||
envKey = f.envPrefix + "_" + envKey
|
envKey = f.envPrefix + "_" + envKey
|
||||||
}
|
}
|
||||||
envKey = strings.Replace(envKey, "-", "_", -1)
|
envKey = strings.Replace(envKey, "-", "_", -1)
|
||||||
|
envKey = strings.Replace(envKey, ".", "_", -1)
|
||||||
|
|
||||||
value, isSet := env[envKey]
|
value, isSet := env[envKey]
|
||||||
if !isSet {
|
if !isSet {
|
||||||
|
|
Loading…
Reference in a new issue