Fix absolute path getting for runc binary

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov
2015-06-26 14:56:53 -07:00
parent a1c3018cc4
commit 4d6c19af8b
2 changed files with 6 additions and 7 deletions
+6
View File
@@ -39,6 +39,12 @@ func InitArgs(args ...string) func(*LinuxFactory) error {
if lp, err := exec.LookPath(name); err == nil {
name = lp
}
} else {
abs, err := filepath.Abs(name)
if err != nil {
return err
}
name = abs
}
l.InitPath = name
l.InitArgs = append([]string{name}, args[1:]...)