Make sure module config loading errors have file positioning info

Fixes #8845
This commit is contained in:
Bjørn Erik Pedersen
2021-08-03 09:57:14 +02:00
parent 9ff17c3324
commit d70c485707
4 changed files with 16 additions and 9 deletions

View File

@@ -507,11 +507,5 @@ func (configLoader) loadSiteConfig(cfg config.Provider) (scfg SiteConfig, err er
}
func (l configLoader) wrapFileError(err error, filename string) error {
err, _ = herrors.WithFileContextForFile(
err,
filename,
filename,
l.Fs,
herrors.SimpleLineMatcher)
return err
return herrors.WithFileContextForFileDefault(err, filename, l.Fs)
}