From 482e9a422186a78e2d4c61ac4862748e863e26b3 Mon Sep 17 00:00:00 2001 From: Michal Pristas Date: Wed, 7 Sep 2022 10:18:02 +0200 Subject: [PATCH] fixed docker build --- magefile.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/magefile.go b/magefile.go index 31d13cabd7a..9599d4eef52 100644 --- a/magefile.go +++ b/magefile.go @@ -894,12 +894,11 @@ func movePackagesToArchive(dropPath string, requiredPackages []string) string { continue } - targetDir := filepath.Join(archivePath, rp, filepath.Base(f)) - targetPath := filepath.Join(targetDir, filepath.Base(f)) + targetPath := filepath.Join(archivePath, rp, filepath.Base(f)) + targetDir := filepath.Dir(targetPath) if err := os.MkdirAll(targetDir, 0750); err != nil { fmt.Printf("warning: failed to create directory %s: %s", targetDir, err) } - if err := os.Rename(f, targetPath); err != nil { panic(errors.Wrap(err, "failed renaming file")) }