ctr: improve error relative shim path error msg

addresses https://github.com/containerd/containerd/issues/6464

Return an error if a runtime provided is relative.

Add context to the usage for `ctr run --runtime` indicating that
absolute path to runtime binary must be provided.

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
This commit is contained in:
Gavin Inglis
2022-02-05 00:55:47 +00:00
parent a9f61ba2c8
commit 7b045ea5f0
4 changed files with 107 additions and 2 deletions

View File

@@ -134,7 +134,7 @@ var (
},
cli.StringFlag{
Name: "runtime",
Usage: "runtime name",
Usage: "runtime name or absolute path to runtime binary",
Value: defaults.DefaultRuntime,
},
cli.StringFlag{