From 5a76d236a8ec5f6114a21e57d04e51470cd5228d Mon Sep 17 00:00:00 2001 From: aerth Date: Wed, 25 Jul 2018 20:51:40 -0700 Subject: [PATCH] cmd/geth: require valid command as argument (or no arg) --- cmd/geth/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index e42aab30ac..6d531dcd32 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -251,6 +251,9 @@ func main() { // It creates a default node based on the command line arguments and runs it in // blocking mode, waiting for it to be shut down. func geth(ctx *cli.Context) error { + if args := ctx.Args(); len(args) > 0 { + return fmt.Errorf("invalid command: %q", args[0]) + } node := makeFullNode(ctx) startNode(ctx, node) node.Wait()