mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Fix absolute path getting for runc binary
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
@@ -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:]...)
|
||||
|
||||
Reference in New Issue
Block a user