From 816bc959053f914ffae58590b79d173706ea8614 Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Fri, 16 Oct 2020 12:12:00 -0400 Subject: [PATCH] Return yaml unmarshal error --- config/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/config.go b/config/config.go index 6d0a0540..e88e09f8 100644 --- a/config/config.go +++ b/config/config.go @@ -81,6 +81,9 @@ func parseAndValidateConfigBytes(yamlBytes []byte) (config *Config, err error) { yamlBytes = []byte(os.ExpandEnv(string(yamlBytes))) // Parse configuration file err = yaml.Unmarshal(yamlBytes, &config) + if err != nil { + return + } // Check if the configuration file at least has services. if config == nil || config.Services == nil || len(config.Services) == 0 { err = ErrNoServiceInConfig