Skip to content

Commit 6eb011f

Browse files
authored
Merge pull request #3137 from sbueringer/pr-fix-envtest-dl
🐛 Create BinaryAssetsDirectory if it doesn't exist
2 parents b04d5fd + 44108f8 commit 6eb011f

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)