From 6ff50acc3b08026aee04cb1d46f4865f1d76ac6e Mon Sep 17 00:00:00 2001 From: Michal Pristas Date: Wed, 7 Sep 2022 14:19:50 +0200 Subject: [PATCH] fixed docker build (#1105) --- 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")) }