From ac6e0add317ff6baeccc102e1159859bea364e78 Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Fri, 12 Oct 2018 04:05:21 +0300 Subject: [PATCH] single binary -- coredns also tries to parse arguments, it kills itself on unknown flags --- app.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app.go b/app.go index 608f1590..c3ae4b07 100644 --- a/app.go +++ b/app.go @@ -109,6 +109,11 @@ func main() { } } + // eat all args so that coredns can start happily + if len(os.Args) > 1 { + os.Args = os.Args[:1] + } + err := writeConfig() if err != nil { log.Fatal(err)