mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
Skip rendering partials
The output of a rendered partial is not used and rendering it might fail if it expects different values
This commit is contained in:
parent
3a943696b7
commit
b94eb82d12
1 changed files with 5 additions and 0 deletions
|
|
@ -193,6 +193,11 @@ func (e *Engine) render(tpls map[string]renderable) (map[string]string, error) {
|
|||
rendered := make(map[string]string, len(files))
|
||||
var buf bytes.Buffer
|
||||
for _, file := range files {
|
||||
// Don't render partials. We don't care out the direct output of partials.
|
||||
// They are only included from other templates.
|
||||
if strings.HasPrefix(path.Base(file), "_") {
|
||||
continue
|
||||
}
|
||||
// At render time, add information about the template that is being rendered.
|
||||
vals := tpls[file].vals
|
||||
vals["Template"] = map[string]interface{}{"Name": file, "BasePath": tpls[file].basePath}
|
||||
|
|
|
|||
Loading…
Reference in a new issue