From 9e463e0bca3f7c4275150dd36d1d4a020293ff90 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Tue, 20 Jun 2017 12:01:10 -0700 Subject: [PATCH] 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 --- coremain/run.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coremain/run.go b/coremain/run.go index 85024efcc..837a51c77 100644 --- a/coremain/run.go +++ b/coremain/run.go @@ -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)