restore: Improve error message for more than one ID

This commit is contained in:
Alexander Neumann 2018-01-06 22:44:18 +01:00
parent 180741609e
commit 92316a9853

View file

@ -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 == "" {