fix(lint): remove ineffectual assignment in LVM snapshot mount

This commit is contained in:
2025-12-13 21:32:31 +01:00
parent dbb0f6f942
commit fbe2c691ec

View File

@@ -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)
}