From 3504ce391d2047e88bc20a09497d8d8b71ff448d Mon Sep 17 00:00:00 2001 From: Matthew Coleman Date: Mon, 18 Aug 2025 15:28:40 -0400 Subject: [PATCH] fix: wrap file not found error --- viper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/viper.go b/viper.go index 6e3a9b1..8f11c85 100644 --- a/viper.go +++ b/viper.go @@ -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