Raise an error if the `templates/` dir is not valid and return early.

Signed-off-by: Zach Burgess <zachburg@google.com>
This commit is contained in:
Zach Burgess 2025-07-07 20:31:41 -07:00
parent 6e30619d8f
commit eea2d4577b
1 changed files with 4 additions and 1 deletions

View File

@ -59,7 +59,10 @@ func TemplatesWithSkipSchemaValidation(linter *support.Linter, values map[string
return return
} }
linter.RunLinterRule(support.WarningSev, fpath, validateTemplatesDir(templatesPath)) validTemplatesDir := linter.RunLinterRule(support.ErrorSev, fpath, validateTemplatesDir(templatesPath))
if !validTemplatesDir {
return
}
// Load chart and parse templates // Load chart and parse templates
chart, err := loader.Load(linter.ChartDir) chart, err := loader.Load(linter.ChartDir)