Skip to content

Commit 13e3e83

Browse files
authored
Merge pull request #2094 from orisano/fix-unwrap-error
fix: unwrap error for os.IsNotExist
2 parents 84e5225 + 3d284e1 commit 13e3e83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

container/common/helpers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929

3030
"github.com/golang/glog"
3131
"github.com/karrick/godirwalk"
32+
"github.com/pkg/errors"
3233
)
3334

3435
func DebugInfo(watches map[string][]string) map[string][]string {
@@ -165,7 +166,7 @@ func listDirectories(dirpath string, parent string, recursive bool, output map[s
165166
dirents, err := godirwalk.ReadDirents(dirpath, buf)
166167
if err != nil {
167168
// Ignore if this hierarchy does not exist.
168-
if os.IsNotExist(err) {
169+
if os.IsNotExist(errors.Cause(err)) {
169170
err = nil
170171
}
171172
return err

0 commit comments

Comments
 (0)