ctr: use full path for bundle in run

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2017-01-12 10:23:29 -08:00
parent f9aac9d599
commit 8e603d2e48
1 changed files with 5 additions and 2 deletions

View File

@ -85,9 +85,13 @@ var runCommand = cli.Command{
}
defer os.RemoveAll(tmpDir)
bundle, err := filepath.Abs(context.String("bundle"))
if err != nil {
return err
}
crOpts := &execution.CreateContainerRequest{
ID: id,
BundlePath: context.String("bundle"),
BundlePath: bundle,
Console: context.Bool("tty"),
Stdin: filepath.Join(tmpDir, "stdin"),
Stdout: filepath.Join(tmpDir, "stdout"),
@ -116,7 +120,6 @@ var runCommand = cli.Command{
select {
case e, more := <-evCh:
if !more {
fmt.Println("No More!")
break eventLoop
}