Skip to content

Commit

Permalink
Merge pull request #43 from joao-zanutto/patch-6
Browse files Browse the repository at this point in the history
fix environment variable configuration not being loaded
  • Loading branch information
wwoytenko authored Apr 1, 2024
2 parents cd3d273 + 06a3d92 commit 3237536
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/greenmask/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package cmd
import (
"fmt"
"runtime/debug"
"strings"

"github.com/mitchellh/mapstructure"
"github.com/rs/zerolog"
Expand Down Expand Up @@ -140,6 +141,7 @@ func initConfig() {
return
}

viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.AutomaticEnv()

if err := viper.ReadInConfig(); err != nil {
Expand Down

0 comments on commit 3237536

Please sign in to comment.