From 609d7630ca538ce5fe9a125d09c355f43cf052ba Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Thu, 6 Oct 2016 11:14:54 -0500 Subject: [PATCH] small amount of error checking and help for path to the runtime Signed-off-by: Mike Brown --- README.md | 4 ++++ cmd/server/main.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index c23f1c2a..60e608a7 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,10 @@ $ sudo make install ``` # ocid --debug ``` +If the default --runtime value does not point to your runtime: +``` +# ocid --runtime $(which runc) +``` #### Create a pod ``` diff --git a/cmd/server/main.go b/cmd/server/main.go index d1f28aa1..3195d906 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -88,6 +88,10 @@ func main() { } logrus.SetOutput(f) } + if _, err := os.Stat(c.GlobalString("runtime")); os.IsNotExist(err) { + // path to runtime does not exist + return fmt.Errorf("invalid --runtime value %q", err) + } switch c.GlobalString("log-format") { case "text": // retain logrus's default.