mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
cmd/geth: require valid command as argument (or no arg)
This commit is contained in:
parent
900ac1315c
commit
5a76d236a8
1 changed files with 3 additions and 0 deletions
|
|
@ -251,6 +251,9 @@ func main() {
|
||||||
// It creates a default node based on the command line arguments and runs it in
|
// It creates a default node based on the command line arguments and runs it in
|
||||||
// blocking mode, waiting for it to be shut down.
|
// blocking mode, waiting for it to be shut down.
|
||||||
func geth(ctx *cli.Context) error {
|
func geth(ctx *cli.Context) error {
|
||||||
|
if args := ctx.Args(); len(args) > 0 {
|
||||||
|
return fmt.Errorf("invalid command: %q", args[0])
|
||||||
|
}
|
||||||
node := makeFullNode(ctx)
|
node := makeFullNode(ctx)
|
||||||
startNode(ctx, node)
|
startNode(ctx, node)
|
||||||
node.Wait()
|
node.Wait()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue