CI: add the grabpl build-backend command into the repo (#52673)

* Move the grabpl build-backend command and clean it up a bit
This commit is contained in:
Kevin Minehart
2022-07-28 10:11:22 -04:00
committed by GitHub
parent f215a35caf
commit d567f199dd
35 changed files with 1720 additions and 49 deletions
+16
View File
@@ -0,0 +1,16 @@
package main
import "github.com/urfave/cli/v2"
func ArgCountWrapper(max int, action cli.ActionFunc) cli.ActionFunc {
return func(ctx *cli.Context) error {
if ctx.NArg() > max {
if err := cli.ShowSubcommandHelp(ctx); err != nil {
return cli.Exit(err.Error(), 1)
}
return cli.Exit("", 1)
}
return action(ctx)
}
}