From 432dcede3627251503c210af220ac447bb278b5c Mon Sep 17 00:00:00 2001 From: Shishir Mahajan Date: Thu, 27 Aug 2015 11:03:43 -0400 Subject: [PATCH] Error should be checked after loadSpec Signed-off-by: Shishir Mahajan --- start.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/start.go b/start.go index 49669a07..8d5b6deb 100644 --- a/start.go +++ b/start.go @@ -18,15 +18,15 @@ var startCommand = cli.Command{ Usage: "create and run a container", Action: func(context *cli.Context) { spec, err := loadSpec(context.Args().First()) + if err != nil { + fatal(err) + } notifySocket := os.Getenv("NOTIFY_SOCKET") if notifySocket != "" { setupSdNotify(spec, notifySocket) } - if err != nil { - fatal(err) - } if os.Geteuid() != 0 { logrus.Fatal("runc should be run as root") }