Adding exit codes to cli commands (#11735)

* adding exit codes to cmd

* adding in fatal logs to other cli actions

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
james-prysm
2022-12-13 06:13:33 -06:00
committed by GitHub
parent 3fcdd58872
commit 043079dafe
9 changed files with 56 additions and 14 deletions

View File

@@ -32,9 +32,14 @@ var requestBlocksFlags = struct {
}{}
var requestBlocksCmd = &cli.Command{
Name: "beacon-blocks-by-range",
Usage: "Request a range of blocks from a beacon node via a p2p connection",
Action: cliActionRequestBlocks,
Name: "beacon-blocks-by-range",
Usage: "Request a range of blocks from a beacon node via a p2p connection",
Action: func(cliCtx *cli.Context) error {
if err := cliActionRequestBlocks(cliCtx); err != nil {
log.WithError(err).Fatal("Could not request blocks by range")
}
return nil
},
Flags: []cli.Flag{
cmd.ChainConfigFileFlag,
&cli.StringFlag{