From a013014c247ff5e78abbd5844c952483075a37d0 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 13 May 2023 22:34:02 +0200 Subject: [PATCH] backup: return normal error if --group-by cannot be parsed Co-authored-by: greatroar <61184462+greatroar@users.noreply.github.com> --- internal/restic/snapshot_group.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/restic/snapshot_group.go b/internal/restic/snapshot_group.go index 9efae2ff6..964a230b3 100644 --- a/internal/restic/snapshot_group.go +++ b/internal/restic/snapshot_group.go @@ -2,10 +2,9 @@ package restic import ( "encoding/json" + "fmt" "sort" "strings" - - "github.com/restic/restic/internal/errors" ) type SnapshotGroupByOptions struct { @@ -26,7 +25,7 @@ func splitSnapshotGroupBy(s string) (SnapshotGroupByOptions, error) { l.Tag = true case "": default: - return SnapshotGroupByOptions{}, errors.Fatal("unknown grouping option: '" + option + "'") + return SnapshotGroupByOptions{}, fmt.Errorf("unknown grouping option: %q", option) } } return l, nil