Error should be checked after loadSpec
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
This commit is contained in:
parent
7291a52148
commit
432dcede36
6
start.go
6
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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue