Skip to content

Commit

Permalink
fix: use config value as default when loading from env
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge committed Jul 18, 2024
1 parent 4c00cd5 commit 673739c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ func (c *config) Load(path string, fsys fs.FS) error {
builder := NewPathBuilder(path)
// Load default values
var buf bytes.Buffer
if err := initConfigTemplate.Option("missingkey=zero").Execute(&buf, nil); err != nil {
if err := initConfigTemplate.Option("missingkey=zero").Execute(&buf, c); err != nil {
return errors.Errorf("failed to initialise config template: %w", err)
}
dec := toml.NewDecoder(&buf)
Expand Down

0 comments on commit 673739c

Please sign in to comment.