summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-18 18:47:37 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-18 18:47:37 +0200
commitab692e73dea3ddfe979c88ee236cc394e47e82f1 (patch)
tree6362fc7eceff2d5318ed03f0cb823924982824e4 /hugolib
parent7cdc244a72de4c08edc0008e37aec83d945dccdf (diff)
hugolib: Log WARNING only on unknown /data files
Fixes #3361
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/datafiles_test.go9
-rw-r--r--hugolib/site.go3
2 files changed, 2 insertions, 10 deletions
diff --git a/hugolib/datafiles_test.go b/hugolib/datafiles_test.go
index 3aac3201f..5beb59249 100644
--- a/hugolib/datafiles_test.go
+++ b/hugolib/datafiles_test.go
@@ -98,15 +98,6 @@ func TestDataDirMultipleSources(t *testing.T) {
}
-func TestDataDirUnknownFormat(t *testing.T) {
- t.Parallel()
-
- sources := []source.ByteSource{
- {Name: filepath.FromSlash("data/test.roml"), Content: []byte("boo")},
- }
- doTestDataDir(t, true, sources)
-}
-
func doTestDataDir(t *testing.T, expected interface{}, sources []source.ByteSource, configKeyValues ...interface{}) {
var (
cfg, fs = newTestCfg()
diff --git a/hugolib/site.go b/hugolib/site.go
index d8e40f039..3b7d47533 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -841,7 +841,8 @@ func (s *Site) loadData(sources []source.Input) (err error) {
data, err := s.readData(r)
if err != nil {
- return fmt.Errorf("Failed to read data from %s: %s", filepath.Join(r.Path(), r.LogicalName()), err)
+ s.Log.WARN.Printf("Failed to read data from %s: %s", filepath.Join(r.Path(), r.LogicalName()), err)
+ continue
}
if data == nil {