Skip to content

Commit

Permalink
fix: #997 use setting env value over default values
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeis committed Sep 26, 2024
1 parent 28937bb commit dd83d7f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/configurable.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ func (o *Setting) IsDefined() bool {
}

func (o *Setting) Configure() error {
if o.Value == "" {
o.Value = os.Getenv(o.EnvVariable)
envValue := os.Getenv(o.EnvVariable)
if envValue != "" {
o.Value = envValue
}
return o.IsValidErr()
}
Expand Down

0 comments on commit dd83d7f

Please sign in to comment.