summaryrefslogtreecommitdiffstats
path: root/hugolib/codeowners.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-12-14 12:20:13 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-12-14 13:51:06 +0100
commitad2059878a8d6ace9669ccc5ff0a8d4e5811ad37 (patch)
tree34d88705ab22e5b54949a6ce48e028b1fc2ab7e6 /hugolib/codeowners.go
parent87e898a17a52b5338bc9d554dd12b99a54aa2431 (diff)
Also consider wrapped errors when checking for file IsNotExist errors
Fixes #10534
Diffstat (limited to 'hugolib/codeowners.go')
-rw-r--r--hugolib/codeowners.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/codeowners.go b/hugolib/codeowners.go
index 17e956981..162ee16ae 100644
--- a/hugolib/codeowners.go
+++ b/hugolib/codeowners.go
@@ -15,9 +15,9 @@ package hugolib
import (
"io"
- "os"
"path"
+ "github.com/gohugoio/hugo/common/herrors"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/resources/page"
"github.com/hairyhenderson/go-codeowners"
@@ -32,7 +32,7 @@ func findCodeOwnersFile(dir string) (io.Reader, error) {
_, err := afs.Stat(f)
if err != nil {
- if os.IsNotExist(err) {
+ if herrors.IsNotExist(err) {
continue
}
return nil, err