aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-16 11:39:27 -0500
committerGitHub <noreply@github.com>2021-02-16 11:39:27 -0500
commit7fb347a3d40afeb4c565c2066fbade7f003e3e50 (patch)
tree7fcd21db6746f9c83428146a745a23cb5e344026 /libpod
parent58a4793bec30058f648dcd1248da333a7bb6d47c (diff)
parent2ec0e3b650bcce43a8c9d0f47703eceaf947edbe (diff)
downloadpodman-7fb347a3d40afeb4c565c2066fbade7f003e3e50.tar.gz
podman-7fb347a3d40afeb4c565c2066fbade7f003e3e50.tar.bz2
podman-7fb347a3d40afeb4c565c2066fbade7f003e3e50.zip
Merge pull request #9399 from vrothberg/home-sweet-home
do not set empty $HOME
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index f23a5233c..2360d0737 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -466,7 +466,7 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
break
}
}
- if !hasHomeSet {
+ if !hasHomeSet && execUser.Home != "" {
c.config.Spec.Process.Env = append(c.config.Spec.Process.Env, fmt.Sprintf("HOME=%s", execUser.Home))
}