mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
backup: return normal error if --group-by cannot be parsed
Co-authored-by: greatroar <61184462+greatroar@users.noreply.github.com>
This commit is contained in:
parent
f9850b79b5
commit
a013014c24
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user