diff --git a/components/engine/vendor.conf b/components/engine/vendor.conf index e878a75ec52..1f4e40466ac 100644 --- a/components/engine/vendor.conf +++ b/components/engine/vendor.conf @@ -27,7 +27,7 @@ golang.org/x/sync e225da77a7e68af35c70ccbf71af # buildkit github.com/moby/buildkit 4f4e03067523b2fc5ca2f17514a5e75ad63e02fb -github.com/tonistiigi/fsutil 3bbb99cdbd76619ab717299830c60f6f2a533a6b +github.com/tonistiigi/fsutil 0f039a052ca1da01626278199624b62aed9b3729 github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746 github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7 github.com/google/shlex 6f45313302b9c56850fc17f99e40caebce98c716 diff --git a/components/engine/vendor/github.com/tonistiigi/fsutil/copy/copy.go b/components/engine/vendor/github.com/tonistiigi/fsutil/copy/copy.go index a57f9dc8eaa..f9d91fdaeeb 100644 --- a/components/engine/vendor/github.com/tonistiigi/fsutil/copy/copy.go +++ b/components/engine/vendor/github.com/tonistiigi/fsutil/copy/copy.go @@ -329,21 +329,6 @@ func ensureEmptyFileTarget(dst string) error { return os.Remove(dst) } -func copyFile(source, target string) error { - src, err := os.Open(source) - if err != nil { - return errors.Wrapf(err, "failed to open source %s", source) - } - defer src.Close() - tgt, err := os.Create(target) - if err != nil { - return errors.Wrapf(err, "failed to open target %s", target) - } - defer tgt.Close() - - return copyFileContent(tgt, src) -} - func containsWildcards(name string) bool { isWindows := runtime.GOOS == "windows" for i := 0; i < len(name); i++ { diff --git a/components/engine/vendor/github.com/tonistiigi/fsutil/copy/copy_darwin.go b/components/engine/vendor/github.com/tonistiigi/fsutil/copy/copy_darwin.go new file mode 100644 index 00000000000..2882dfda9d6 --- /dev/null +++ b/components/engine/vendor/github.com/tonistiigi/fsutil/copy/copy_darwin.go @@ -0,0 +1,84 @@ +// +build darwin + +package fs + +import ( + "io" + "os" + "syscall" + "unsafe" + + "github.com/pkg/errors" + "golang.org/x/sys/unix" +) + +//