Commit a69056a1 authored by Johnny's avatar Johnny

fix: handle underscores in environment variables correctly

parent f827296d
......@@ -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()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment