Merge pull request #12748 from ningmingxiao/fix_args

command: show help and exit on unknown positional arguments
This commit is contained in:
Samuel Karp
2026-01-14 00:19:47 +00:00
committed by GitHub

View File

@@ -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)