Browse Source

use env for flags wtih dot in name (#4415)

pull/4423/head
SmsS4 2 years ago
committed by GitHub
parent
commit
4131874fa8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      weed/util/fla9/fla9.go

4
weed/util/fla9/fla9.go

@ -1059,11 +1059,13 @@ func (f *FlagSet) ParseEnv(environ []string) error {
}
envKey := strings.ToUpper(flag.Name)
if f.envPrefix != "" {
envKey = f.envPrefix + "_" + envKey
}
envKey = strings.Replace(envKey, "-", "_", -1)
envKey = strings.Replace(envKey, ".", "_", -1)
value, isSet := env[envKey]
if !isSet {
continue

Loading…
Cancel
Save