Skip to content
Permalink
Browse files

Merge pull request #4657 from jdieter/fix-runtime-path-when-root

Return empty runtime directory if we're not rootless
  • Loading branch information
openshift-merge-robot committed Dec 7, 2019
2 parents 82a83b9 + b3014c1 commit 7287f69b52e5bcb59f9977b261ee488942465ecb
Showing with 4 additions and 0 deletions.
  1. +4 −0 pkg/util/utils_supported.go
@@ -20,6 +20,10 @@ import (
func GetRuntimeDir() (string, error) {
var rootlessRuntimeDirError error

if !rootless.IsRootless() {
return "", nil
}

rootlessRuntimeDirOnce.Do(func() {
runtimeDir := os.Getenv("XDG_RUNTIME_DIR")
uid := fmt.Sprintf("%d", rootless.GetRootlessUID())

0 comments on commit 7287f69

Please sign in to comment.
You can’t perform that action at this time.