From 559b4272342937788df4cab3072949982f062471 Mon Sep 17 00:00:00 2001 From: Sami Alajrami Date: Fri, 15 May 2020 16:20:53 +0200 Subject: [PATCH] don't validate env vars when files don't contain dollar signs --- internal/app/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/app/utils.go b/internal/app/utils.go index 9b3cd07b..80456093 100644 --- a/internal/app/utils.go +++ b/internal/app/utils.go @@ -341,7 +341,7 @@ func substituteEnv(name string) string { // validateEnvVars parses a string line-by-line and detect env variables in // non-comment lines. It then checks that each env var found has a value. func validateEnvVars(s string, filename string) (bool, string) { - if !flags.skipValidation { + if !flags.skipValidation && strings.Contains(s, "$") { log.Info("validating environment variables in " + filename) var key string comment, _ := regexp.Compile("#(.*)$")