Skip to content

Commit

Permalink
config: respect envvars for settings
Browse files Browse the repository at this point in the history
  • Loading branch information
abenz1267 committed Nov 4, 2024
1 parent 2bef239 commit 1cb4586
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ func Get(config string) *Config {

cfg := &Config{}

viper.AutomaticEnv()

err = viper.Unmarshal(cfg)
if err != nil {
log.Panic(err)
Expand Down
3 changes: 3 additions & 0 deletions internal/config/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ func GetLayout(theme string, base []string) *UI {
log.Panicln(err)
}

layoutCfg.AutomaticEnv()

ui := &UICfg{}

err = layoutCfg.Unmarshal(ui)
if err != nil {
log.Panic(err)
Expand Down

0 comments on commit 1cb4586

Please sign in to comment.