From 3f43c04750cb6362ee0970860252b8c251a1fa79 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Thu, 27 Jan 2022 10:52:44 +0100 Subject: [PATCH] pkg/utils: find the runtime directory with missing XDG_RUNTIME_DIR `toolbox run` times out waiting for the `container-initialized` file in the wrong runtime directory if XDG_RUNTIME_DIR is not set. Be smarter about finding the correct runtime directory. Fixes: #995 Signed-off-by: Sebastian Wick --- src/pkg/utils/utils.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkg/utils/utils.go b/src/pkg/utils/utils.go index 3119fee74..008046eff 100644 --- a/src/pkg/utils/utils.go +++ b/src/pkg/utils/utils.go @@ -423,6 +423,7 @@ func GetRuntimeDirectory(targetUser *user.User) (string, error) { if uid == 0 { runtimeDirectory = "/run" } else { + EnsureXdgRuntimeDirIsSet(uid) runtimeDirectory = os.Getenv("XDG_RUNTIME_DIR") }