From 9bd5c94ce509857984c6babc69a44cf7595d9e68 Mon Sep 17 00:00:00 2001 From: Aditya R Date: Thu, 29 Sep 2022 13:57:49 +0530 Subject: [PATCH] util, GetRuntimeDir: don't error out early if XDG_RUNTIME_DIR is not found We must try out all possible alternatives for rootless users instead of failing eary if XDG_RUNTIME_DIR is not set. Following regression was part of: https://github.com/containers/common/commit/48f90f538f3e49ee6a66f1e4efad1a6498800efe [NO NEW TESTS NEEDED] [NO TESTS NEEDED] Signed-off-by: Aditya R --- pkg/util/util_supported.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/util/util_supported.go b/pkg/util/util_supported.go index e4d07c98e..0cd53af53 100644 --- a/pkg/util/util_supported.go +++ b/pkg/util/util_supported.go @@ -34,8 +34,7 @@ func GetRuntimeDir() (string, error) { rootlessRuntimeDirOnce.Do(func() { runtimeDir, err := homedir.GetRuntimeDir() if err != nil { - rootlessRuntimeDirError = err - return + logrus.Debug(err) } if runtimeDir != "" { st, err := os.Stat(runtimeDir)