From a69056a1c2241e31a38055498ee30a727c347640 Mon Sep 17 00:00:00 2001 From: Johnny Date: Sun, 8 Feb 2026 20:38:43 +0800 Subject: [PATCH] fix: handle underscores in environment variables correctly --- cmd/memos/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/memos/main.go b/cmd/memos/main.go index bb182b8f7..55545843a 100644 --- a/cmd/memos/main.go +++ b/cmd/memos/main.go @@ -7,6 +7,7 @@ import ( "net/http" "os" "os/signal" + "strings" "syscall" "github.com/spf13/cobra" @@ -131,6 +132,7 @@ func init() { } viper.SetEnvPrefix("memos") + viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) viper.AutomaticEnv() }