Skip to content

Commit

Permalink
use default values if env var is specified but empty (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwagner5 authored and jillmon committed Jan 3, 2020
1 parent 819f5b2 commit b4f5279
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ func ParseCliArgs() Config {
// Get env var or default
func getEnv(key string, fallback string) string {
if value, ok := os.LookupEnv(key); ok {
return value
if value != "" {
return value
}
}
return fallback
}
Expand Down

0 comments on commit b4f5279

Please sign in to comment.