Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hugolib/hugo_sites_test.go2
-rw-r--r--hugolib/site_test.go5
-rw-r--r--tpl/template.go4
3 files changed, 3 insertions, 8 deletions
diff --git a/hugolib/hugo_sites_test.go b/hugolib/hugo_sites_test.go
index 66c818acf..e14a04cb6 100644
--- a/hugolib/hugo_sites_test.go
+++ b/hugolib/hugo_sites_test.go
@@ -17,7 +17,6 @@ import (
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugofs"
"github.com/spf13/hugo/source"
- jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -29,7 +28,6 @@ type testSiteConfig struct {
func init() {
testCommonResetState()
- jww.SetStdoutThreshold(jww.LevelCritical)
}
func testCommonResetState() {
diff --git a/hugolib/site_test.go b/hugolib/site_test.go
index 22c615828..bc43fca0f 100644
--- a/hugolib/site_test.go
+++ b/hugolib/site_test.go
@@ -33,11 +33,6 @@ import (
"github.com/stretchr/testify/require"
)
-func init() {
- //There are expected ERROR logging in tests that produces a lot of noise.
- jww.SetStdoutThreshold(jww.LevelCritical)
-}
-
const (
pageSimpleTitle = `---
title: simple template
diff --git a/tpl/template.go b/tpl/template.go
index 0f78fa00f..a1568b911 100644
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -460,7 +460,9 @@ func (t *GoHTMLTemplate) loadTemplates(absPath string, prefix string) {
}
}
- t.AddTemplateFile(tplName, baseTemplatePath, path)
+ if err := t.AddTemplateFile(tplName, baseTemplatePath, path); err != nil {
+ jww.ERROR.Printf("Failed to add template %s: %s", tplName, err)
+ }
}
return nil