Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: handle underscores in environment variables correctly

Johnnya69056a1c224
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()
}