fix: wrap file not found error

This commit is contained in:
Matthew Coleman
2025-10-08 12:00:40 +02:00
committed by Márk Sági-Kazár
parent 3c673554b5
commit 3504ce391d
+1 -1
View File
@@ -1497,7 +1497,7 @@ func (v *Viper) ReadInConfig() error {
if err != nil {
if errors.As(err, &pathError) {
// The specified config file is missing
return FileNotFoundError{path: filename}
return FileNotFoundError{err: err, path: filename}
} else {
// We hit some other error from the filesystem that isn't a missing file
return err