worker: don't marshal manifest in byte[] from

The manifest is of type distro.Manifest, which is an alias for a
byte array, i.e. it is already in marshalled form. There is no
need to marshal it again before passing it to osbuild.
This commit is contained in:
Christian Kellner 2022-01-26 17:12:14 +00:00 committed by Tom Gundersen
parent 9fba2dcc5d
commit 46b2c2e31d

View file

@ -42,9 +42,9 @@ func RunOSBuild(manifest distro.Manifest, store, outputDirectory string, exports
return nil, fmt.Errorf("error starting osbuild: %v", err)
}
err = json.NewEncoder(stdin).Encode(manifest)
_, err = stdin.Write(manifest)
if err != nil {
return nil, fmt.Errorf("error encoding osbuild pipeline: %v", err)
return nil, fmt.Errorf("error writing osbuild manifest: %v", err)
}
err = stdin.Close()