mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 21:47:13 +08:00
vendor: update buildkit with typed errors support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
6
vendor/github.com/tonistiigi/fsutil/stat.go
generated
vendored
6
vendor/github.com/tonistiigi/fsutil/stat.go
generated
vendored
@ -31,13 +31,13 @@ func mkstat(path, relpath string, fi os.FileInfo, inodemap map[uint64]string) (*
|
||||
if fi.Mode()&os.ModeSymlink != 0 {
|
||||
link, err := os.Readlink(path)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to readlink %s", path)
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
stat.Linkname = link
|
||||
}
|
||||
}
|
||||
if err := loadXattr(path, stat); err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to xattr %s", relpath)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
@ -58,7 +58,7 @@ func mkstat(path, relpath string, fi os.FileInfo, inodemap map[uint64]string) (*
|
||||
func Stat(path string) (*types.Stat, error) {
|
||||
fi, err := os.Lstat(path)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "os stat")
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
return mkstat(path, filepath.Base(path), fi, nil)
|
||||
}
|
||||
|
Reference in New Issue
Block a user