From 60d233189af96834b3ce8aeb6c4098c9ce51c0c3 Mon Sep 17 00:00:00 2001 From: Sertac Ozercan Date: Tue, 12 Nov 2024 22:14:13 +0000 Subject: [PATCH] fix dnf Signed-off-by: Sertac Ozercan --- pkg/pkgmgr/rpm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/pkgmgr/rpm.go b/pkg/pkgmgr/rpm.go index c8c44840..5eb87d6e 100644 --- a/pkg/pkgmgr/rpm.go +++ b/pkg/pkgmgr/rpm.go @@ -462,7 +462,7 @@ func (rm *rpmManager) installUpdates(ctx context.Context, updates unversioned.Up if dnfTooling == "" { dnfTooling = rm.rpmTools["dnf"] } - checkUpdateTemplate := `sh -c "$(%[1]s -q check-update | wc -l); if [ $? -ne 0 ]; then echo >> /updates.txt; fi"` + checkUpdateTemplate := `sh -c 'if [ "$(%[1]s -q check-update | wc -l)" -ne 0 ]; then echo >> /updates.txt; fi'` if !rm.checkForUpgrades(ctx, dnfTooling, checkUpdateTemplate) { return nil, nil, fmt.Errorf("no patchable packages found") }