From b4f527969897725d6b7918ec8058a8d535762d02 Mon Sep 17 00:00:00 2001 From: Brandon Wagner Date: Fri, 3 Jan 2020 13:43:26 -0600 Subject: [PATCH] use default values if env var is specified but empty (#40) --- pkg/config/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 809a0831..fe6043ce 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -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 }