Skip to content

Commit

Permalink
add check for eerr
Browse files Browse the repository at this point in the history
  • Loading branch information
RidRisR committed Dec 26, 2024
1 parent 6411b8a commit f0d740a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/backup-manager/app/compact/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit f0d740a

Please sign in to comment.