mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user