Remove process termination in case of error from runDNF function

log.Fatalf not only writes into a log, but also exits the process.
Instead, we want the caller to handle the error.

Also, the logged message is imho wrong.
This commit is contained in:
Ondřej Budai 2019-10-14 09:42:27 +02:00 committed by Tom Gundersen
parent 44088d9a6b
commit 8644213bb7

View file

@ -2,7 +2,6 @@ package rpmmd
import (
"encoding/json"
"log"
"os"
"os/exec"
"sort"
@ -47,7 +46,6 @@ func runDNF(command string, arguments []string, result interface{}) error {
cmd.Stderr = os.Stderr
stdout, err := cmd.StdoutPipe()
if err != nil {
log.Fatalf("Could not execute dnf-json")
return err
}