diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-06-12 16:49:53 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-12 16:49:53 +0000 |
commit | 095902985ff143b8ec34691c30e735f62521ee4c (patch) | |
tree | cd39d992f8cd96efe5fd9a15755ae458c3e727c5 /runsc/cmd/create.go | |
parent | 19b473c6e2fe412c0e96c8b9e4672922da19471a (diff) | |
parent | 356d1be140bb51f2a50d2c7fe24242cbfeedc9d6 (diff) |
Merge 356d1be1 (automated)
Diffstat (limited to 'runsc/cmd/create.go')
-rw-r--r-- | runsc/cmd/create.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runsc/cmd/create.go b/runsc/cmd/create.go index 8bf9b7dcf..e82e8c667 100644 --- a/runsc/cmd/create.go +++ b/runsc/cmd/create.go @@ -82,13 +82,17 @@ func (c *Create) Execute(_ context.Context, f *flag.FlagSet, args ...interface{} id := f.Arg(0) conf := args[0].(*boot.Config) + if conf.Rootless { + return Errorf("Rootless mode not supported with %q", c.Name()) + } + bundleDir := c.bundleDir if bundleDir == "" { bundleDir = getwdOrDie() } spec, err := specutils.ReadSpec(bundleDir) if err != nil { - Fatalf("reading spec: %v", err) + return Errorf("reading spec: %v", err) } specutils.LogSpec(spec) @@ -96,7 +100,7 @@ func (c *Create) Execute(_ context.Context, f *flag.FlagSet, args ...interface{} // container unless the metadata specifies that it should be run in an // existing container. if _, err := container.Create(id, spec, conf, bundleDir, c.consoleSocket, c.pidFile, c.userLog); err != nil { - Fatalf("creating container: %v", err) + return Errorf("creating container: %v", err) } return subcommands.ExitSuccess } |