Merge pull request #230 from shishir-a412ed/error_check_load_spec

Error should be checked after loadSpec
This commit is contained in:
Mrunal Patel 2015-08-27 08:18:47 -07:00
commit 7797873f1b
1 changed files with 3 additions and 3 deletions

View File

@ -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")
}