Skip to content

Commit 7c26c04

Browse files
authored
fix: ignore envs declared with empty value (#3062)
1 parent 3f52227 commit 7c26c04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ func LoadEnvHook(f reflect.Kind, t reflect.Kind, data interface{}) (interface{},
782782
}
783783
value := data.(string)
784784
if matches := envPattern.FindStringSubmatch(value); len(matches) > 1 {
785-
if env, exists := os.LookupEnv(matches[1]); exists {
785+
if env := os.Getenv(matches[1]); len(env) > 0 {
786786
value = env
787787
}
788788
}

0 commit comments

Comments
 (0)