Skip to content

Commit bd23d6a

Browse files
authored
fix(manifest): Create parent directories of dest archive path (#2213)
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io> Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
2 parents 0d2f736 + 2f539c5 commit bd23d6a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

manifest/pack_pull_archive.go

+4
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ func pullArchive(ctx context.Context, manifest *Manifest, resource string, check
206206
}
207207
}
208208

209+
if err := os.MkdirAll(filepath.Dir(cache), 0o755); err != nil {
210+
return fmt.Errorf("could not create parent directories: %v", err)
211+
}
212+
209213
// Copy the completed download to the local cache path
210214
if err := os.Rename(tmpCache, cache); err != nil {
211215
return fmt.Errorf("could not move downloaded package '%s' to destination '%s': %v", tmpCache, cache, err)

0 commit comments

Comments
 (0)