diff --git a/backend/config/config.go b/backend/config/config.go index f35c39cfb..2972f65d8 100644 --- a/backend/config/config.go +++ b/backend/config/config.go @@ -114,13 +114,14 @@ func Load(cfgFile *string) (*Config, error) { return nil, fmt.Errorf("failed to unmarshal config: %w", err) } - err = c.PostProcess() + err = envconfig.Process("", c) if err != nil { - return nil, fmt.Errorf("failed to post process config: %w", err) + return nil, fmt.Errorf("failed to load config from env vars: %w", err) } - if err := envconfig.Process("", c); err != nil { - return nil, fmt.Errorf("failed to load config from env vars: %w", err) + err = c.PostProcess() + if err != nil { + return nil, fmt.Errorf("failed to post process config: %w", err) } if err = c.Validate(); err != nil {