Exit when extra/errorneous flags are set (#965)

This commit is contained in:
Ivan Daniluk 2018-05-17 16:03:23 +03:00 committed by GitHub
parent cf8ad7e002
commit 4b17ea1ced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -87,6 +87,11 @@ func main() {
flag.Usage = printUsage
flag.Parse()
if flag.NArg() > 0 {
stdlog.Printf("Extra args in command line: %v", flag.Args())
printUsage()
os.Exit(1)
}
config, err := makeNodeConfig()
if err != nil {