From 25f62af16273441a5510261e04699895da5fa28f 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) --- nsinit/nsinit/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nsinit/nsinit/main.go b/nsinit/nsinit/main.go index c299412c..786c9c1e 100644 --- a/nsinit/nsinit/main.go +++ b/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) }