Skip to content

Commit

Permalink
Add extra folder to userConfigDir to look for config
Browse files Browse the repository at this point in the history
  • Loading branch information
phwissmann committed Aug 29, 2024
1 parent 17937eb commit c9cc973
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openem-ingestor/core/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package core
import (
"fmt"
"os"
"path"

"github.com/spf13/viper"
)
Expand Down Expand Up @@ -52,8 +53,8 @@ func ReadConfig() error {
viper.SetConfigType("yaml")

userConfigDir, _ := os.UserConfigDir()
viper.AddConfigPath(userConfigDir)

viper.AddConfigPath(path.Join(userConfigDir, "openem-ingestor"))
viper.AddConfigPath("./")

err := viper.ReadInConfig()
Expand Down

0 comments on commit c9cc973

Please sign in to comment.