mirror of
https://github.com/containers/podman.git
synced 2025-09-28 01:04:28 +08:00
Vendor Buildah v1.8.3
Vendor in Buildah v1.8.3 Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
This commit is contained in:
13
vendor/github.com/containers/buildah/chroot/run.go
generated
vendored
13
vendor/github.com/containers/buildah/chroot/run.go
generated
vendored
@ -84,9 +84,18 @@ type runUsingChrootExecSubprocOptions struct {
|
||||
// RunUsingChroot runs a chrooted process, using some of the settings from the
|
||||
// passed-in spec, and using the specified bundlePath to hold temporary files,
|
||||
// directories, and mountpoints.
|
||||
func RunUsingChroot(spec *specs.Spec, bundlePath string, stdin io.Reader, stdout, stderr io.Writer) (err error) {
|
||||
func RunUsingChroot(spec *specs.Spec, bundlePath, homeDir string, stdin io.Reader, stdout, stderr io.Writer) (err error) {
|
||||
var confwg sync.WaitGroup
|
||||
|
||||
var homeFound bool
|
||||
for _, env := range spec.Process.Env {
|
||||
if strings.HasPrefix(env, "HOME=") {
|
||||
homeFound = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !homeFound {
|
||||
spec.Process.Env = append(spec.Process.Env, fmt.Sprintf("HOME=%s", homeDir))
|
||||
}
|
||||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
|
||||
|
Reference in New Issue
Block a user