summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-11-27 14:33:42 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-11-27 14:33:50 +0100
commit3c6dca2f873b14c1b046db993580a90c2af323c8 (patch)
tree05722355cb1262beb136ad62d07528d5fc1e0b6e /libpod
parentad2439264d401af0443be564ccc68169a8517db4 (diff)
downloadpodman-3c6dca2f873b14c1b046db993580a90c2af323c8.tar.gz
podman-3c6dca2f873b14c1b046db993580a90c2af323c8.tar.bz2
podman-3c6dca2f873b14c1b046db993580a90c2af323c8.zip
runtime: set XDG_* env variables if missing
regression introduced when moving to Podman 2.0. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1877228 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 792492db6..df3dfae2b 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -162,6 +162,10 @@ func newRuntimeFromConfig(ctx context.Context, conf *config.Config, options ...R
runtime.config = conf
+ if err := SetXdgDirs(); err != nil {
+ return nil, err
+ }
+
storeOpts, err := storage.DefaultStoreOptions(rootless.IsRootless(), rootless.GetRootlessUID())
if err != nil {
return nil, err