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: 5948e6b369

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
This commit is contained in:
Aditya R 2022-09-29 13:57:49 +05:30
parent 4c7ae632c9
commit aa2831dc24
1 changed files with 1 additions and 2 deletions

View File

@ -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)