Exit when extra/errorneous flags are set (#965)
This commit is contained in:
parent
cf8ad7e002
commit
4b17ea1ced
|
@ -87,6 +87,11 @@ func main() {
|
||||||
|
|
||||||
flag.Usage = printUsage
|
flag.Usage = printUsage
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
if flag.NArg() > 0 {
|
||||||
|
stdlog.Printf("Extra args in command line: %v", flag.Args())
|
||||||
|
printUsage()
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
config, err := makeNodeConfig()
|
config, err := makeNodeConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue