Merge pull request #1755 from AkihiroSuda/fix-ctr-snapshot-args
ctr: fix args
This commit is contained in:
commit
571c002ef6
@ -156,7 +156,7 @@ var prepareCommand = cli.Command{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
if context.NArg() != 2 {
|
if narg := context.NArg(); narg < 1 || narg > 2 {
|
||||||
return cli.ShowSubcommandHelp(context)
|
return cli.ShowSubcommandHelp(context)
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
@ -195,7 +195,7 @@ var viewCommand = cli.Command{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
if context.NArg() != 2 {
|
if narg := context.NArg(); narg < 1 || narg > 2 {
|
||||||
return cli.ShowSubcommandHelp(context)
|
return cli.ShowSubcommandHelp(context)
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user