diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-12-01 06:36:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-01 06:36:51 -0800 |
commit | 41f250c4861b9950b63dc7501211d13b6e0bd5ed (patch) | |
tree | 088715bf479c5c49f058520ec590054f514535a9 /libpod | |
parent | 6b8f89d07447959635fa0c345933cd4fbadc9682 (diff) | |
parent | deeb3eaf7dde436fd23f8bcb03d30021e2b27c0b (diff) | |
download | podman-41f250c4861b9950b63dc7501211d13b6e0bd5ed.tar.gz podman-41f250c4861b9950b63dc7501211d13b6e0bd5ed.tar.bz2 podman-41f250c4861b9950b63dc7501211d13b6e0bd5ed.zip |
Merge pull request #1903 from giuseppe/fix-rootless-tests
tests: fix rootless tests on Ubuntu
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/oci.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libpod/oci.go b/libpod/oci.go index 6ca3ef2e6..3222f9403 100644 --- a/libpod/oci.go +++ b/libpod/oci.go @@ -696,8 +696,12 @@ func (r *OCIRuntime) stopContainer(ctr *Container, timeout uint) error { // deleteContainer deletes a container from the OCI runtime func (r *OCIRuntime) deleteContainer(ctr *Container) error { - _, err := utils.ExecCmd(r.path, "delete", "--force", ctr.ID()) - return err + runtimeDir, err := util.GetRootlessRuntimeDir() + if err != nil { + return err + } + env := []string{fmt.Sprintf("XDG_RUNTIME_DIR=%s", runtimeDir)} + return utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, env, r.path, "delete", "--force", ctr.ID()) } // pauseContainer pauses the given container |