Redirect dnf-json stderr to osbuild-composer stderr
When something wrong happens, we want to know about it.
This commit is contained in:
parent
abd958f463
commit
44088d9a6b
1 changed files with 2 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ package rpmmd
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -43,6 +44,7 @@ func runDNF(command string, arguments []string, result interface{}) error {
|
||||||
argv := append([]string{"dnf-json", command}, arguments...)
|
argv := append([]string{"dnf-json", command}, arguments...)
|
||||||
|
|
||||||
cmd := exec.Command("python3", argv...)
|
cmd := exec.Command("python3", argv...)
|
||||||
|
cmd.Stderr = os.Stderr
|
||||||
stdout, err := cmd.StdoutPipe()
|
stdout, err := cmd.StdoutPipe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Could not execute dnf-json")
|
log.Fatalf("Could not execute dnf-json")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue