skip resources that are empty strings (#131)

This commit is contained in:
Bobby Brennan
2019-06-04 16:28:58 -04:00
committed by GitHub
parent 139e6611b1
commit 12e10f9111

View File

@@ -99,6 +99,9 @@ func CreateResourceProviderFromPath(directory string) (*ResourceProvider, error)
}
specs := regexp.MustCompile("\n-+\n").Split(string(contents), -1)
for _, spec := range specs {
if strings.TrimSpace(spec) == "" {
continue
}
err = addYaml(spec)
if err != nil {
logrus.Errorf("Error parsing YAML %v", err)