From 4d706f35987492e0f95256df47fc3af2f8cdf070 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sun, 27 Apr 2025 14:30:10 +0200 Subject: [PATCH] build: be more verbose when file sync fail. --- pkg/paths/paths.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/paths/paths.go b/pkg/paths/paths.go index 912611850..357b9c2f7 100644 --- a/pkg/paths/paths.go +++ b/pkg/paths/paths.go @@ -391,7 +391,11 @@ func CopyTo(src *Path, dst *Path) error { // CopyFS copies the file system fsys into the directory dir, // creating dir if necessary. It is the exivalent of os.CopyFS with Path. func (p *Path) CopyFS(dst *Path) error { - return os.CopyFS(dst.String(), os.DirFS(p.String())) + err := os.CopyFS(dst.String(), os.DirFS(p.String())) + if err != nil { + return fmt.Errorf("copying %s to %s: %s", p, dst, err) + } + return nil } // CopyDirTo recursively copies the directory denoted by the current path to