Skip to content

Commit dfadec7

Browse files
author
Ricky Cousins
committed
Add --assumeyes
1 parent b5726ae commit dfadec7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

distros/rhel/rhel.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
type Rhel struct{}
1111

1212
func (Rhel) GetSecurityUpdates() int {
13-
cmd := exec.Command("sh", "-c", "yes | dnf updateinfo list --sec-severity=Critical --sec-severity=Important --all | wc -l")
13+
cmd := exec.Command("sh", "-c", "dnf updateinfo list --assumeyes --sec-severity=Critical --sec-severity=Important --all | wc -l")
1414
out, err := cmd.Output()
1515
if err != nil {
1616
log.Printf("Error running dnf: %v", err)
@@ -20,7 +20,7 @@ func (Rhel) GetSecurityUpdates() int {
2020
}
2121

2222
func (Rhel) GetTotalUpdates() int {
23-
cmd := exec.Command("sh", "-c", "yes | dnf updateinfo list --all | wc -l")
23+
cmd := exec.Command("sh", "-c", "dnf updateinfo list --assumeyes --all | wc -l")
2424
out, err := cmd.Output()
2525
if err != nil {
2626
log.Printf("Error running dnf: %v", err)

0 commit comments

Comments
 (0)