From 44108f8563dec6a7ffb74140f0ec5bfee9ee8c3f Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Mon, 3 Mar 2025 17:43:51 +0100 Subject: [PATCH] Create BinaryAssetsDirectory if it doesn't exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- pkg/envtest/binaries.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/envtest/binaries.go b/pkg/envtest/binaries.go index 58a341c263..4c9b1dae38 100644 --- a/pkg/envtest/binaries.go +++ b/pkg/envtest/binaries.go @@ -142,7 +142,7 @@ func downloadBinaryAssets(ctx context.Context, binaryAssetsDirectory, binaryAsse // This makes it possible to share the envtest binaries with setup-envtest if the BinaryAssetsDirectory is set to SetupEnvtestDefaultBinaryAssetsDirectory(). downloadDir := path.Join(downloadRootDir, fmt.Sprintf("%s-%s-%s", strings.TrimPrefix(binaryAssetsVersion, "v"), runtime.GOOS, runtime.GOARCH)) if !fileExists(downloadDir) { - if err := os.Mkdir(downloadDir, 0700); err != nil { + if err := os.MkdirAll(downloadDir, 0700); err != nil { return "", "", "", fmt.Errorf("failed to create directory %q for envtest binaries: %w", downloadDir, err) } }