Skip to content

Commit 61e5d58

Browse files
committed
fix: wrap file not found error
1 parent 3d0131b commit 61e5d58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

viper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ func (v *Viper) ReadInConfig() error {
14971497
if err != nil {
14981498
if errors.As(err, &pathError) {
14991499
// The specified config file is missing
1500-
return FileNotFoundError{path: filename}
1500+
return FileNotFoundError{err: err, path: filename}
15011501
} else {
15021502
// We hit some other error from the filesystem that isn't a missing file
15031503
return err

0 commit comments

Comments
 (0)