mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-23 07:01:34 +00:00
On error, return error message, not nil
This commit is contained in:
parent
c00a1fcb7f
commit
8a48412c44
1 changed files with 1 additions and 1 deletions
|
@ -197,7 +197,7 @@ func (t *GoHTMLTemplate) AddTemplateFile(name, baseTemplatePath, path string) er
|
||||||
compiler := amber.New()
|
compiler := amber.New()
|
||||||
// Parse the input file
|
// Parse the input file
|
||||||
if err := compiler.ParseFile(path); err != nil {
|
if err := compiler.ParseFile(path); err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := compiler.CompileWithTemplate(t.New(templateName)); err != nil {
|
if _, err := compiler.CompileWithTemplate(t.New(templateName)); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue