cmd/geth: require valid command as argument (or no arg)

This commit is contained in:
aerth 2018-07-25 20:51:40 -07:00
parent 900ac1315c
commit 5a76d236a8
No known key found for this signature in database
GPG key ID: EBC461F686385D5C

View file

@ -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()