From 3d284e19eb578b4cd9db2b698fb18e7e4c23a532 Mon Sep 17 00:00:00 2001 From: Nao YONASHIRO Date: Wed, 7 Nov 2018 15:01:18 +0900 Subject: [PATCH] fix: unwrap error for os.IsNotExist --- container/common/helpers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/container/common/helpers.go b/container/common/helpers.go index 2aab6acc..4bd75f11 100644 --- a/container/common/helpers.go +++ b/container/common/helpers.go @@ -29,6 +29,7 @@ import ( "github.com/golang/glog" "github.com/karrick/godirwalk" + "github.com/pkg/errors" ) func DebugInfo(watches map[string][]string) map[string][]string { @@ -165,7 +166,7 @@ func listDirectories(dirpath string, parent string, recursive bool, output map[s dirents, err := godirwalk.ReadDirents(dirpath, buf) if err != nil { // Ignore if this hierarchy does not exist. - if os.IsNotExist(err) { + if os.IsNotExist(errors.Cause(err)) { err = nil } return err