Skip to content

Commit b4f5279

Browse files
bwagner5jillmon
authored andcommitted
use default values if env var is specified but empty (#40)
1 parent 819f5b2 commit b4f5279

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/config/config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ func ParseCliArgs() Config {
108108
// Get env var or default
109109
func getEnv(key string, fallback string) string {
110110
if value, ok := os.LookupEnv(key); ok {
111-
return value
111+
if value != "" {
112+
return value
113+
}
112114
}
113115
return fallback
114116
}

0 commit comments

Comments
 (0)