core: errors on junk in the command line (#744)

We would silently ignore anything that we couldn't parse on the command
line, this change make this an error.

Fixes #743
This commit is contained in:
Miek Gieben
2017-06-20 12:01:10 -07:00
committed by GitHub
parent 3c6964ac9d
commit 9e463e0bca

View File

@@ -60,6 +60,10 @@ func Run() {
flag.Parse()
if len(flag.Args()) > 0 {
mustLogFatal(fmt.Errorf("extra command line arguments: %s", flag.Args()))
}
// Set up process log before anything bad happens
if logfile {
log.SetOutput(os.Stdout)