diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/configLoader.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/configLoader.go b/config/configLoader.go index 8dcfcbdcc..145b95d7d 100644 --- a/config/configLoader.go +++ b/config/configLoader.go @@ -18,6 +18,8 @@ import ( "path/filepath" "strings" + "github.com/gohugoio/hugo/common/herrors" + "github.com/pkg/errors" "github.com/gohugoio/hugo/common/paths" @@ -58,7 +60,7 @@ func FromConfigString(config, configType string) (Provider, error) { func FromFile(fs afero.Fs, filename string) (Provider, error) { m, err := loadConfigFromFile(fs, filename) if err != nil { - return nil, err + return nil, herrors.WithFileContextForFileDefault(err, filename, fs) } return NewFrom(m), nil } |