mirror of
https://github.com/containerd/containerd.git
synced 2026-08-09 09:33:06 +00:00
command: show help and exit on unknown positional arguments
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
This commit is contained in:
committed by
ningmingxiao
parent
1be58315b6
commit
677e991bb5
@@ -119,6 +119,10 @@ can be used and modified as necessary as a custom configuration.`
|
||||
ociHook,
|
||||
}
|
||||
app.Action = func(cliContext *cli.Context) error {
|
||||
if args := cliContext.Args(); args.First() != "" {
|
||||
return cli.ShowCommandHelp(cliContext, args.First())
|
||||
}
|
||||
|
||||
var (
|
||||
start = time.Now()
|
||||
signals = make(chan os.Signal, 2048)
|
||||
|
||||
Reference in New Issue
Block a user