build: directory creation
This now precreates the directory as it's possible that the directory doesn't exist yet at this point; see #94. Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
parent
a5f5b48293
commit
34de7d7ce5
1 changed files with 3 additions and 0 deletions
|
|
@ -28,6 +28,9 @@ func buildImage(res *imagefilter.Result, osbuildManifest []byte, opts *buildOpti
|
|||
}
|
||||
if opts.WriteManifest {
|
||||
p := filepath.Join(opts.OutputDir, fmt.Sprintf("%s.osbuild-manifest.json", outputNameFor(res)))
|
||||
if err := os.MkdirAll(filepath.Dir(p), 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := os.WriteFile(p, osbuildManifest, 0644); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue