Skip to content

Commit

Permalink
pkg/utils: find the runtime directory with missing XDG_RUNTIME_DIR
Browse files Browse the repository at this point in the history
`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 <[email protected]>
  • Loading branch information
swick committed Jan 27, 2022
1 parent 656deb3 commit 3f43c04
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit 3f43c04

Please sign in to comment.