diff options
author | 2017-06-20 12:01:10 -0700 | |
---|---|---|
committer | 2017-06-20 12:01:10 -0700 | |
commit | 9e463e0bca3f7c4275150dd36d1d4a020293ff90 (patch) | |
tree | 11b6c1acb85c42ba61a54e251e8ec000cda706f1 /coremain | |
parent | 3c6964ac9d310241f892e606427d57c41591d668 (diff) | |
download | coredns-9e463e0bca3f7c4275150dd36d1d4a020293ff90.tar.gz coredns-9e463e0bca3f7c4275150dd36d1d4a020293ff90.tar.zst coredns-9e463e0bca3f7c4275150dd36d1d4a020293ff90.zip |
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
Diffstat (limited to 'coremain')
-rw-r--r-- | coremain/run.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) |