Skip to content

Commit 44108f8

Browse files
committed
Create BinaryAssetsDirectory if it doesn't exist
Signed-off-by: Stefan Büringer buringerst@vmware.com
1 parent b04d5fd commit 44108f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/envtest/binaries.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func downloadBinaryAssets(ctx context.Context, binaryAssetsDirectory, binaryAsse
142142
// This makes it possible to share the envtest binaries with setup-envtest if the BinaryAssetsDirectory is set to SetupEnvtestDefaultBinaryAssetsDirectory().
143143
downloadDir := path.Join(downloadRootDir, fmt.Sprintf("%s-%s-%s", strings.TrimPrefix(binaryAssetsVersion, "v"), runtime.GOOS, runtime.GOARCH))
144144
if !fileExists(downloadDir) {
145-
if err := os.Mkdir(downloadDir, 0700); err != nil {
145+
if err := os.MkdirAll(downloadDir, 0700); err != nil {
146146
return "", "", "", fmt.Errorf("failed to create directory %q for envtest binaries: %w", downloadDir, err)
147147
}
148148
}

0 commit comments

Comments
 (0)