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
20
20
import (
21
21
"math/rand"
22
22
"os"
23
+ "strings"
23
24
"time"
24
25
25
26
"github.com/ethereum/go-ethereum/log"
@@ -34,7 +35,7 @@ func main() {
34
35
app .Flags = []cli.Flag {
35
36
cli.StringFlag {
36
37
Name : "network" ,
37
- Usage : "name of the network to administer" ,
38
+ Usage : "name of the network to administer (no spaces or hyphens, please) " ,
38
39
},
39
40
cli.IntFlag {
40
41
Name : "loglevel" ,
@@ -47,6 +48,10 @@ func main() {
47
48
log .Root ().SetHandler (log .LvlFilterHandler (log .Lvl (c .Int ("loglevel" )), log .StreamHandler (os .Stdout , log .TerminalFormat (true ))))
48
49
rand .Seed (time .Now ().UnixNano ())
49
50
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
+ }
50
55
// Start the wizard and relinquish control
51
56
makeWizard (c .String ("network" )).run ()
52
57
return nil
You can’t perform that action at this time.
0 commit comments