From fbe2c691ecbd8ca02c2fec2c8392181f2dd7222b Mon Sep 17 00:00:00 2001 From: Alexander Renz Date: Sat, 13 Dec 2025 21:32:31 +0100 Subject: [PATCH] fix(lint): remove ineffectual assignment in LVM snapshot mount --- internal/engine/snapshot/lvm.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/engine/snapshot/lvm.go b/internal/engine/snapshot/lvm.go index 2e60f8e..cc405a5 100644 --- a/internal/engine/snapshot/lvm.go +++ b/internal/engine/snapshot/lvm.go @@ -136,12 +136,11 @@ func (l *LVMBackend) MountSnapshot(ctx context.Context, snap *Snapshot, mountPoi // Mount (read-only, nouuid for XFS) args := []string{"-o", "ro,nouuid", snapDevice, mountPoint} cmd := exec.CommandContext(ctx, "mount", args...) - output, err := cmd.CombinedOutput() - if err != nil { + if _, err := cmd.CombinedOutput(); err != nil { // Try without nouuid (for non-XFS) args = []string{"-o", "ro", snapDevice, mountPoint} cmd = exec.CommandContext(ctx, "mount", args...) - output, err = cmd.CombinedOutput() + output, err := cmd.CombinedOutput() if err != nil { return fmt.Errorf("mount failed: %s: %w", string(output), err) }