Merge pull request #14255 from hiredman/pr-for-14249

Don't complain about XDG_RUNTIME_DIR, Closes  #1424
This commit is contained in:
OpenShift Merge Robot
2022-05-17 11:08:50 +02:00
committed by GitHub

View File

@ -349,7 +349,7 @@ func makeRuntime(runtime *Runtime) (retErr error) {
// it will try to use existing XDG_RUNTIME_DIR
// if current user has no write access to XDG_RUNTIME_DIR we will fail later
if err := unix.Access(runtime.storageConfig.RunRoot, unix.W_OK); err != nil {
msg := "XDG_RUNTIME_DIR is pointing to a path which is not writable. Most likely podman will fail."
msg := fmt.Sprintf("RunRoot is pointing to a path (%s) which is not writable. Most likely podman will fail.", runtime.storageConfig.RunRoot)
if errors.Is(err, os.ErrNotExist) {
// if dir does not exists try to create it
if err := os.MkdirAll(runtime.storageConfig.RunRoot, 0700); err != nil {