From e0ac561af09c1942de526ba1c218d7f4a38809f6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 30 Jul 2024 11:47:19 +0200 Subject: [PATCH] osbuildprogress: reorg lines a bit --- bib/internal/osbuildprogress/progress.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bib/internal/osbuildprogress/progress.go b/bib/internal/osbuildprogress/progress.go index bdd738d88..892084c97 100644 --- a/bib/internal/osbuildprogress/progress.go +++ b/bib/internal/osbuildprogress/progress.go @@ -174,18 +174,19 @@ func RunOSBuild(manifest []byte, store, outputDirectory string, exports, extraEn "--monitor-fd=3", "-", ) + for _, export := range exports { + cmd.Args = append(cmd.Args, "--export", export) + } + cmd.Env = append(os.Environ(), extraEnv...) cmd.Stdin = bytes.NewBuffer(manifest) cmd.Stderr = os.Stderr // we could use "--json" here and would get the build-result // exported here - cmd.Stdout = nil + cmd.Stdout = os.Stdout cmd.ExtraFiles = []*os.File{wp} - go AttachProgress(wg, rp, os.Stdout) - for _, export := range exports { - cmd.Args = append(cmd.Args, "--export", export) - } + go AttachProgress(wg, rp, os.Stdout) if err := cmd.Start(); err != nil { return fmt.Errorf("error starting osbuild: %v", err) }