From 4131874fa8844d1ed6d71ae1cc839f2fc71a81d2 Mon Sep 17 00:00:00 2001
From: SmsS4 <36403983+SmsS4@users.noreply.github.com>
Date: Thu, 20 Apr 2023 20:03:27 +0330
Subject: [PATCH] use env for flags wtih dot in name (#4415)

---
 weed/util/fla9/fla9.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/weed/util/fla9/fla9.go b/weed/util/fla9/fla9.go
index 8cea07311..3770408d2 100644
--- a/weed/util/fla9/fla9.go
+++ b/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