mirror of
https://github.com/helm/helm.git
synced 2026-06-30 19:57:48 +00:00
bugfix:(#11391) helm lint infinite loop
when malformed template object Signed-off-by: wujunwei <wjw3323@live.com>
This commit is contained in:
@@ -141,10 +141,11 @@ func Templates(linter *support.Linter, values map[string]interface{}, namespace
|
||||
break
|
||||
}
|
||||
|
||||
// If YAML linting fails, we sill progress. So we don't capture the returned state
|
||||
// on this linter run.
|
||||
linter.RunLinterRule(support.ErrorSev, fpath, validateYamlContent(err))
|
||||
|
||||
// If YAML linting fails, it will always be fails next block. so we should return here.
|
||||
// fix https://github.com/helm/helm/issues/11391
|
||||
if !linter.RunLinterRule(support.ErrorSev, fpath, validateYamlContent(err)) {
|
||||
return
|
||||
}
|
||||
if yamlStruct != nil {
|
||||
// NOTE: set to warnings to allow users to support out-of-date kubernetes
|
||||
// Refs https://github.com/helm/helm/issues/8596
|
||||
|
||||
Reference in New Issue
Block a user