File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ package main
2020import (
2121 "math/rand"
2222 "os"
23+ "strings"
2324 "time"
2425
2526 "github.com/ethereum/go-ethereum/log"
@@ -34,7 +35,7 @@ func main() {
3435 app .Flags = []cli.Flag {
3536 cli.StringFlag {
3637 Name : "network" ,
37- Usage : "name of the network to administer" ,
38+ Usage : "name of the network to administer (no spaces or hyphens, please) " ,
3839 },
3940 cli.IntFlag {
4041 Name : "loglevel" ,
@@ -47,6 +48,10 @@ func main() {
4748 log .Root ().SetHandler (log .LvlFilterHandler (log .Lvl (c .Int ("loglevel" )), log .StreamHandler (os .Stdout , log .TerminalFormat (true ))))
4849 rand .Seed (time .Now ().UnixNano ())
4950
51+ network := c .String ("network" )
52+ if strings .Contains (network , " " ) || strings .Contains (network , "-" ) {
53+ log .Crit ("No spaces or hyphens allowed in network name" )
54+ }
5055 // Start the wizard and relinquish control
5156 makeWizard (c .String ("network" )).run ()
5257 return nil
You can’t perform that action at this time.
0 commit comments