Skip to content

Commit

Permalink
executor/linux: comment this bizarre code
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed Apr 2, 2019
1 parent 21e895e commit 56048bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/shared/executor/executor_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ func (l *LibcontainerExecutor) Launch(command *ExecCommand) (*ProcessState, erro
}

// Turn relative-to-chroot path into absolute path to avoid
// libcontainer trying to resolve the binary using $PATH
// libcontainer trying to resolve the binary using $PATH.
// Do *not* use filepath.Join as it will translate ".."s returned by
// filepath.Rel. Prepending "/" will cause the path to be rooted in the
// chroot which is the desired behavior.
path = "/" + rel

combined := append([]string{path}, command.Args...)
Expand Down

0 comments on commit 56048bd

Please sign in to comment.