mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
restore: Improve error message for more than one ID
This commit is contained in:
parent
180741609e
commit
92316a9853
@ -53,8 +53,11 @@ func init() {
|
||||
func runRestore(opts RestoreOptions, gopts GlobalOptions, args []string) error {
|
||||
ctx := gopts.ctx
|
||||
|
||||
if len(args) != 1 {
|
||||
switch {
|
||||
case len(args) == 0:
|
||||
return errors.Fatal("no snapshot ID specified")
|
||||
case len(args) > 1:
|
||||
return errors.Fatalf("more than one snapshot ID specified: %v", args)
|
||||
}
|
||||
|
||||
if opts.Target == "" {
|
||||
|
Loading…
Reference in New Issue
Block a user