From b899d9bc446dfa6a6bb5f1b62b0b7800bab5fc74 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 24 Feb 2014 13:40:17 -0800 Subject: [PATCH] Fix tests with dockerinit lookup path Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- libcontainer/nsinit/nsinit/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libcontainer/nsinit/nsinit/main.go b/libcontainer/nsinit/nsinit/main.go index c299412..786c9c1 100644 --- a/libcontainer/nsinit/nsinit/main.go +++ b/libcontainer/nsinit/nsinit/main.go @@ -24,7 +24,7 @@ var ( ErrWrongArguments = errors.New("Wrong argument count") ) -func init() { +func registerFlags() { flag.StringVar(&console, "console", "", "console (pty slave) path") flag.StringVar(&logFile, "log", "none", "log options (none, stderr, or a file path)") flag.IntVar(&pipeFd, "pipe", 0, "sync pipe fd") @@ -33,6 +33,8 @@ func init() { } func main() { + registerFlags() + if flag.NArg() < 1 { log.Fatal(ErrWrongArguments) }