diff options
Diffstat (limited to 'config/configLoader.go')
-rw-r--r-- | config/configLoader.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/configLoader.go b/config/configLoader.go index d25546cdb..6722c12fd 100644 --- a/config/configLoader.go +++ b/config/configLoader.go @@ -59,6 +59,13 @@ func FromConfigString(config, configType string) (Provider, error) { func FromFile(fs afero.Fs, filename string) (Provider, error) { m, err := loadConfigFromFile(fs, filename) if err != nil { + fe := herrors.UnwrapFileError(err) + if fe != nil { + pos := fe.Position() + pos.Filename = filename + fe.UpdatePosition(pos) + return nil, err + } return nil, herrors.NewFileErrorFromFile(err, filename, fs, nil) } return NewFrom(m), nil |