File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
bib/cmd/bootc-image-builder Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package main
22
33import (
44 "encoding/json"
5- "errors"
65 "fmt"
76 "io"
87 "io/fs"
@@ -63,15 +62,7 @@ func saveManifest(ms manifest.OSBuildManifest, fpath string) (err error) {
6362 return fmt .Errorf ("failed to marshal data for %q: %s" , fpath , err .Error ())
6463 }
6564 b = append (b , '\n' ) // add new line at end of file
66- fp , err := os .Create (fpath )
67- if err != nil {
68- return fmt .Errorf ("failed to create output file %q: %s" , fpath , err .Error ())
69- }
70- defer func () { err = errors .Join (err , fp .Close ()) }()
71- if _ , err := fp .Write (b ); err != nil {
72- return fmt .Errorf ("failed to write output file %q: %s" , fpath , err .Error ())
73- }
74- return nil
65+ return os .WriteFile (fpath , b , 0644 )
7566}
7667
7768// manifestFromCobra generate an osbuild manifest from a cobra commandline.
You can’t perform that action at this time.
0 commit comments