fix: detect and error out on incorrect positional args (#236)

This commit is contained in:
Daniel Moran
2021-08-20 17:30:30 -04:00
committed by GitHub
parent c0103e7b1b
commit fa12328714
24 changed files with 204 additions and 64 deletions

View File

@ -58,7 +58,7 @@ func newDeleteCmd() cli.Command {
Destination: &params.Predicate,
},
),
Before: middleware.WithBeforeFns(withCli(), withApi(true)),
Before: middleware.WithBeforeFns(withCli(), withApi(true), middleware.NoArgs),
Action: func(ctx *cli.Context) error {
client := delete.Client{CLI: getCLI(ctx), DeleteApi: getAPI(ctx).DeleteApi}
return client.Delete(getContext(ctx), &params)