From 5eff92d1ba6447ce8846df0d768880d5e3fba6dd Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 14 Nov 2017 03:01:48 +0000 Subject: [PATCH] ctr: fix args Signed-off-by: Akihiro Suda --- cmd/ctr/commands/snapshot/snapshot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/ctr/commands/snapshot/snapshot.go b/cmd/ctr/commands/snapshot/snapshot.go index 734871823..1a54b86f9 100644 --- a/cmd/ctr/commands/snapshot/snapshot.go +++ b/cmd/ctr/commands/snapshot/snapshot.go @@ -156,7 +156,7 @@ var prepareCommand = cli.Command{ }, }, Action: func(context *cli.Context) error { - if context.NArg() != 2 { + if narg := context.NArg(); narg < 1 || narg > 2 { return cli.ShowSubcommandHelp(context) } var ( @@ -195,7 +195,7 @@ var viewCommand = cli.Command{ }, }, Action: func(context *cli.Context) error { - if context.NArg() != 2 { + if narg := context.NArg(); narg < 1 || narg > 2 { return cli.ShowSubcommandHelp(context) } var (