summaryrefslogtreecommitdiff
path: root/pkg/hooks/read.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/hooks/read.go')
-rw-r--r--pkg/hooks/read.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/hooks/read.go b/pkg/hooks/read.go
index ae34913b6..a8c9a7adc 100644
--- a/pkg/hooks/read.go
+++ b/pkg/hooks/read.go
@@ -67,13 +67,16 @@ func ReadDir(path string, extensionStages []string, hooks map[string]*current.Ho
}
for _, file := range files {
- hook, err := Read(filepath.Join(path, file.Name()), extensionStages)
+ filePath := filepath.Join(path, file.Name())
+ hook, err := Read(filePath, extensionStages)
if err != nil {
if err == ErrNoJSONSuffix {
continue
}
if os.IsNotExist(err) {
- continue
+ if err2, ok := err.(*os.PathError); ok && err2.Path == filePath {
+ continue
+ }
}
return err
}