fix resolve link for dirs with trailing /

This commit is contained in:
Tejal Desai
2020-03-06 09:38:00 -08:00
parent 7a17e42af9
commit 3cc8aa2a9c
5 changed files with 27 additions and 7 deletions
+2 -1
View File
@@ -24,6 +24,7 @@ import (
"strings"
"github.com/GoogleContainerTools/kaniko/pkg/util"
"github.com/pkg/errors"
)
// NewCompositeCache returns an initialized composite cache object.
@@ -58,7 +59,7 @@ func (s *CompositeCache) AddPath(p, context string) error {
sha := sha256.New()
fi, err := os.Lstat(p)
if err != nil {
return err
return errors.Wrap(err, "could not add path")
}
if fi.Mode().IsDir() {