Skip to content

Commit

Permalink
Fail if conmon config could not be written
Browse files Browse the repository at this point in the history
`fmt.Errorf` returns a result which has not being used in
conmon-config.go before this patch. We now `log.Fatal` the error to
actually report to the user that config generation has been failed.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
  • Loading branch information
saschagrunert authored and haircommander committed Aug 26, 2020
1 parent 9d61f0f commit 6eb222d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/conmon-config/conmon-config.go
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
"io/ioutil"
"log"

"github.com/containers/conmon/runner/config"
)
Expand Down Expand Up @@ -32,6 +33,6 @@ func main() {
config.ReopenLogsEvent,
config.TimedOutMessage)),
0644); err != nil {
fmt.Errorf(err.Error())
log.Fatal(err)
}
}

0 comments on commit 6eb222d

Please sign in to comment.