diff --git a/cmd/restic/cmd_backup.go b/cmd/restic/cmd_backup.go index a142d0aa8..c55e50115 100644 --- a/cmd/restic/cmd_backup.go +++ b/cmd/restic/cmd_backup.go @@ -771,14 +771,14 @@ func checkPartialSnapshot(sn *restic.Snapshot, checkType string, subCommand stri } switch checkType { - case "error", "fatal": - return errors.Fatalf("selected snapshot %s cannot be used with the command %q because it is a partial snapshot", - sn.ID().Str(), subCommand) - case "warn": - Warnf("be aware that command %s may create unexpected results because %s is a partial snapshot\n", - subCommand, sn.ID().Str()) - return nil - default: - return errors.New("type %s is invalid") + case "error", "fatal": + return errors.Fatalf("selected snapshot %s cannot be used with the command %q because it is a partial snapshot", + sn.ID().Str(), subCommand) + case "warn": + Warnf("be aware that command %s may create unexpected results because %s is a partial snapshot\n", + subCommand, sn.ID().Str()) + return nil + default: + return errors.New("type %s is invalid") } }