From ad2059878a8d6ace9669ccc5ff0a8d4e5811ad37 Mon Sep 17 00:00:00 2001 From: Bjørn Erik Pedersen Date: Wed, 14 Dec 2022 12:20:13 +0100 Subject: Also consider wrapped errors when checking for file IsNotExist errors Fixes #10534 --- hugolib/codeowners.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hugolib/codeowners.go') 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 -- cgit v1.2.3