Skip to content

Commit

Permalink
Make template execution more strict
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Nov 30, 2018
1 parent 273e14f commit 7992f60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/chezmoi/chezmoi.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ func (ts *TargetState) executeTemplate(fs vfs.FS, path string) ([]byte, error) {
if err != nil {
return nil, err
}
tmpl, err := template.New(path).Funcs(ts.Funcs).Parse(string(data))
tmpl, err := template.New(path).Option("missingkey=error").Funcs(ts.Funcs).Parse(string(data))
if err != nil {
return nil, fmt.Errorf("%s: %v", path, err)
}
Expand Down

0 comments on commit 7992f60

Please sign in to comment.