mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
On error, return error message, not nil
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
c00a1fcb7f
commit
8a48412c44
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user