Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

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

SmsS44131874fa884
diff --git a/weed/util/fla9/fla9.go b/weed/util/fla9/fla9.go
index 8cea073110..3770408d2f 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