Add helper function to print usage when wrong number of arguments are supplied

This commit is contained in:
Geoff Stuart
2022-09-14 15:38:15 -04:00
parent 3ca9b1e331
commit 4f75e2041c
39 changed files with 108 additions and 102 deletions

View File

@ -611,7 +611,7 @@ var MpoolConfig = &cli.Command{
ArgsUsage: "[new-config]",
Action: func(cctx *cli.Context) error {
if cctx.NArg() > 1 {
return cli.ShowCommandHelp(cctx, cctx.Command.Name)
return IncorrectNumArgs(cctx)
}
afmt := NewAppFmt(cctx.App)