From f0d740a9b74e80d8f586d7afafbfde98e1e16d97 Mon Sep 17 00:00:00 2001 From: RidRisR <79858083+RidRisR@users.noreply.github.com> Date: Thu, 26 Dec 2024 10:45:41 +0100 Subject: [PATCH] add check for eerr --- cmd/backup-manager/app/compact/manager.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/backup-manager/app/compact/manager.go b/cmd/backup-manager/app/compact/manager.go index edd49e7752..67fe6dd196 100644 --- a/cmd/backup-manager/app/compact/manager.go +++ b/cmd/backup-manager/app/compact/manager.go @@ -109,7 +109,10 @@ func (cm *Manager) base64ifyStorage(ctx context.Context) (string, error) { } out, err := brCmd.Output() if err != nil { - eerr := err.(*exec.ExitError) + eerr,ok := err.(*exec.ExitError) + if !ok { + return "", errors.Annotatef(err, "failed to execute BR with args %v", brCmd.Args) + } klog.Warningf("Failed to execute base64ify; stderr = %s", string(eerr.Stderr)) return "", errors.Annotatef(err, "failed to execute BR with args %v", brCmd.Args) }